Bochs aspects -> BochsController interface renamings

SimulatorController::on...Listener() does not really make sense: These
functions are called when a specific event occurs in the simulator.  A
"Listener" cannot occur.  Renaming these to "on..." for now; we could
alternatively use "on...Event" later.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1455 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-07-16 18:21:06 +00:00
parent b245327b7e
commit e4570d95bd
10 changed files with 43 additions and 43 deletions

View File

@ -117,11 +117,11 @@ void BochsController::onInstrPtrChanged(address_t instrPtr, address_t address_sp
}
if (do_fire)
m_LstList.triggerActiveListeners();
// Note: SimulatorController::onBreakpointListener will not be invoked in this
// Note: SimulatorController::onBreakpoint will not be invoked in this
// implementation.
}
void BochsController::onIOPortListener(unsigned char data, unsigned port, bool out) {
void BochsController::onIOPort(unsigned char data, unsigned port, bool out) {
// Check for active breakpoint-events:
io_cache_t &buffer_cache = m_LstList.getIOBuffer();
io_cache_t::iterator it = buffer_cache.begin();
@ -137,7 +137,7 @@ void BochsController::onIOPortListener(unsigned char data, unsigned port, bool o
it++;
}
m_LstList.triggerActiveListeners();
// Note: SimulatorController::onBreakpointListener will not be invoked in this
// Note: SimulatorController::onBreakpoint will not be invoked in this
// implementation.
}

View File

@ -57,7 +57,7 @@ public:
* @param port the port it was transmitted on
* @param out true if the I/O traffic has been outbound, false otherwise
*/
void onIOPortListener(unsigned char data, unsigned port, bool out);
void onIOPort(unsigned char data, unsigned port, bool out);
/**
* Static internal handler for TimerListeners. This static function is
* called when a previously registered (Bochs) timer triggers. This function

View File

@ -24,7 +24,7 @@ aspect GuestSysCom {
unsigned rDX = getCPU(tjp->that())->gen_reg[2].word.rx; // port number
unsigned rAL = getCPU(tjp->that())->gen_reg[0].word.byte.rl; // data
if (rDX == BOCHS_COM_PORT)
fail::simulator.onGuestSystemListener((char)rAL, rDX);
fail::simulator.onGuestSystem((char)rAL, rDX);
}
};

View File

@ -21,7 +21,7 @@ aspect IOPortCom {
{
unsigned rDX = getCPU(tjp->that())->gen_reg[2].word.rx; // port number
unsigned char rAL = getCPU(tjp->that())->gen_reg[0].word.byte.rl; // data
fail::simulator.onIOPortListener(rAL, rDX, true);
fail::simulator.onIOPort(rAL, rDX, true);
}
pointcut inInstruction() = "% ...::bx_cpu_c::IN_ALDX(...)";
@ -30,7 +30,7 @@ aspect IOPortCom {
{
unsigned rDX = getCPU(tjp->that())->gen_reg[2].word.rx; // port number
unsigned char rAL = getCPU(tjp->that())->gen_reg[0].word.byte.rl; // data
fail::simulator.onIOPortListener(rAL, rDX, false);
fail::simulator.onIOPort(rAL, rDX, false);
}
};

View File

@ -28,9 +28,9 @@ aspect Interrupt {
unsigned vector = *(tjp->arg<0>());
unsigned type = *(tjp->arg<1>());
if (type == BX_EXTERNAL_INTERRUPT)
fail::simulator.onInterruptListener(vector, false);
fail::simulator.onInterrupt(vector, false);
else if (type == BX_NMI)
fail::simulator.onInterruptListener(vector, true);
fail::simulator.onInterrupt(vector, true);
}
};

View File

@ -60,7 +60,7 @@ aspect Jump {
advice execution (defJumpInstructions()) : around()
{
bxInstruction_c* pInstr = *(tjp->arg<0>()); // bxInstruction_c-object
fail::simulator.onJumpListener(true, pInstr->getIaOpcode());
fail::simulator.onJump(true, pInstr->getIaOpcode());
/*
JoinPoint::That* pThis = tjp->that();
if(pThis == NULL)
@ -109,7 +109,7 @@ aspect Jump {
advice execution (regJumpInstructions()) : around ()
{
bxInstruction_c* pInstr = *(tjp->arg<0>()); // bxInstruction_c-object
fail::simulator.onJumpListener(false, pInstr->getIaOpcode());
fail::simulator.onJump(false, pInstr->getIaOpcode());
/*
JoinPoint::That* pThis = tjp->that();

View File

@ -61,14 +61,14 @@ aspect MemAccess {
#ifdef CONFIG_EVENT_MEMWRITE
advice execution (write_methods()) : after ()
{
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
*(tjp->arg<1>()), sizeof(*(tjp->arg<2>())), true,
getCPU(tjp->that())->prev_rip);
}
advice execution (write_methods_RMW()) : after ()
{
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
rmw_address, sizeof(*(tjp->arg<0>())), true,
getCPU(tjp->that())->prev_rip);
}
@ -77,7 +77,7 @@ aspect MemAccess {
{
std::cerr << "WOOOOOT write_methods_new_stack" << std::endl;
// TODO: Log-level?
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
*(tjp->arg<1>()), sizeof(*(tjp->arg<3>())), true,
getCPU(tjp->that())->prev_rip);
}
@ -86,7 +86,7 @@ aspect MemAccess {
{
std::cerr << "WOOOOOT write_methods_new_stack_64" << std::endl;
// TODO: Log-level?
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
*(tjp->arg<0>()), sizeof(*(tjp->arg<2>())), true,
getCPU(tjp->that())->prev_rip);
}
@ -98,7 +98,7 @@ aspect MemAccess {
// memory (e.g., to read vectors from the interrupt vector
// table).
/*
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
*(tjp->arg<0>()), sizeof(*(tjp->arg<1>())), true,
getCPU(tjp->that())->prev_rip);
*/
@ -114,14 +114,14 @@ aspect MemAccess {
#ifdef CONFIG_EVENT_MEMREAD
advice execution (read_methods()) : before ()
{
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
*(tjp->arg<1>()), sizeof(*(tjp->result())), false,
getCPU(tjp->that())->prev_rip);
}
advice execution (read_methods_dqword()) : before ()
{
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
*(tjp->arg<1>()), 16, false,
getCPU(tjp->that())->prev_rip);
}
@ -131,7 +131,7 @@ aspect MemAccess {
{
rmw_address = *(tjp->arg<1>());
#ifdef CONFIG_EVENT_MEMREAD
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
*(tjp->arg<1>()), sizeof(*(tjp->result())), false,
getCPU(tjp->that())->prev_rip);
#endif
@ -145,7 +145,7 @@ aspect MemAccess {
// memory (e.g., to read vectors from the interrupt vector
// table).
/*
fail::simulator.onMemoryAccessListener(
fail::simulator.onMemoryAccess(
*(tjp->arg<0>()), sizeof(*(tjp->result())), false,
getCPU(tjp->that())->prev_rip);
*/

View File

@ -15,7 +15,7 @@ aspect Trap {
advice execution (exception_method()) : before ()
{
fail::simulator.onTrapListener(*(tjp->arg<0>()));
fail::simulator.onTrap(*(tjp->arg<0>()));
// TODO: There are some different types of exceptions at cpu.h (line 265-281)
// Which kind of traps are these types?
}