Aspect-based implementation of fast breakpoints added (optional).

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1685 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-09-25 10:10:02 +00:00
parent 0783931bf6
commit 0cb6b39490
17 changed files with 725 additions and 107 deletions

View File

@ -97,9 +97,10 @@ void BochsController::onBreakpoint(address_t instrPtr, address_t address_space)
// Check for active breakpoint-events:
bp_cache_t &buffer_cache = m_LstList.getBPBuffer();
bp_cache_t::iterator it = buffer_cache.begin();
BPEvent tmp(instrPtr, address_space);
while (it != buffer_cache.end()) {
BPListener* pEvBreakpt = *it;
if (pEvBreakpt->isMatching(instrPtr, address_space)) {
if (pEvBreakpt->isMatching(&tmp)) {
pEvBreakpt->setTriggerInstructionPointer(instrPtr);
it = buffer_cache.makeActive(m_LstList, it);
do_fire = true;

View File

@ -47,10 +47,10 @@ public:
/**
* Instruction pointer modification handler implementing the onBreakpoint
* handler of the SimulatorController. This method is called (from
* the Breakpoints aspect) every time the Bochs-internal IP changes.
* the Breakpoints aspect) *every* time the Bochs-internal IP changes.
* The handler itself evaluates if a breakpoint event needs to be triggered.
* This handler needs to implement the breakpoint-mechanism in an indirect
* fashion because the Bochs simulator doesn't support breakpoints explicitly.
* fashion because the Bochs simulator doesn't support native breakpoints.
* To match the interface specified by the simulator class, we need to provide
* the two members \c m_CPUContext and \c m_CacheEntry. The elements are
* being set before the handler is called (see \c updateBPEventInfo()).

View File

@ -22,7 +22,7 @@ aspect Breakpoints {
// Points to the *current* bxInstruction-object
bxICacheEntry_c* pEntry = *(tjp->arg<1>());
// report this event to the Bochs controller:
// Report this event to the Bochs controller:
fail::simulator.updateBPEventInfo(pThis, pEntry);
fail::simulator.onBreakpoint(pThis->get_instruction_pointer(), pThis->cr3);
// Note: get_bx_opcode_name(pInstr->getIaOpcode()) retrieves the mnemonics.