The Pedigree Project 0.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
DLTrapHandler Class Reference

#include <DynamicLinker.h>

+ Inheritance diagram for DLTrapHandler:
+ Collaboration diagram for DLTrapHandler:

Public Member Functions

virtual bool trap (InterruptState &state, uintptr_t address, bool bIsWrite, bool bWasPresent)
 

Static Public Member Functions

static DLTrapHandler & instance ()
 

Private Member Functions

 DLTrapHandler ()
 
 ~DLTrapHandler ()
 

Static Private Attributes

static DLTrapHandler m_Instance
 

Detailed Description

Tiny class for dispatching MemoryTrap events to DynamicLinkers. A MemoryTrap event will occur when a page of an ELF has yet to be loaded.

Definition at line 136 of file DynamicLinker.h.

Constructor & Destructor Documentation

◆ DLTrapHandler()

DLTrapHandler::DLTrapHandler ( )
private

Private constructor - does nothing.

Definition at line 555 of file DynamicLinker.cc.

References assert, PageFaultHandler::instance(), and PageFaultHandler::registerHandler().

◆ ~DLTrapHandler()

DLTrapHandler::~DLTrapHandler ( )
private

Private destructor - does nothing, not expected to be called.

Definition at line 560 of file DynamicLinker.cc.

References assert, PageFaultHandler::instance(), and PageFaultHandler::unregisterHandler().

Member Function Documentation

◆ instance()

static DLTrapHandler & DLTrapHandler::instance ( )
inlinestatic

Retrieve the singleton DLTrapHandler instance.

Definition at line 139 of file DynamicLinker.h.

◆ trap()

bool DLTrapHandler::trap ( InterruptState &  state,
uintptr_t  address,
bool  bIsWrite,
bool  bWasPresent 
)
virtual

Trap event handler.

Parameters
addressThe address of the trap.
bIsWriteTrue if the trap was caused by a write, false if by a read.
bWasPresentTrue if the processor reported a protection fault, false if the page was absent when the access occurred.
Returns
True if the trap was handled successfully (and the handler can return), or false if another handler needs to be tried.

Implements MemoryTrapHandler.

Definition at line 565 of file DynamicLinker.cc.

References ProcessorBase::information(), and DynamicLinker::trap().

Member Data Documentation

◆ m_Instance

DLTrapHandler DLTrapHandler::m_Instance
staticprivate

Definition at line 154 of file DynamicLinker.h.


The documentation for this class was generated from the following files: