#include <DebugStub.h>
Onikiri::DebugStubのコラボレーション図
Public メソッド | |
DebugStub (SystemBase::SystemContext *context, int pid) | |
void | OnExec (EmulationDebugOp *op) |
~DebugStub () | |
構成 | |
struct | DebugPacket |
DebugStub.h の 41 行で定義されています。
DebugStub::DebugStub | ( | SystemBase::SystemContext * | context, | |
int | pid | |||
) |
DebugStub.cpp の 42 行で定義されています。
参照先 ASSERT・Onikiri::g_env・Onikiri::Environment::PrintInternal()・Onikiri::SystemBase::SystemContext::targetArchitecture・Onikiri::SystemBase::SystemContext::threads.
00042 : 00043 m_acc(m_ioService, tcp::endpoint(tcp::v4(), (unsigned short)context->debugParam.debugPort)) 00044 { 00045 ASSERT(context->targetArchitecture == "AlphaLinux", "GDB Debug mode is currently available on AlphaLinux only."); 00046 ASSERT(context->threads.GetSize() == 1, "Multithread GDB Debugging is not supported."); 00047 00048 m_context = context; 00049 m_pid = pid; 00050 m_stopExec = true; 00051 m_stopCount = 0; 00052 g_env.PrintInternal("Waiting for host GDB access..."); 00053 m_acc.accept(*m_iostream.rdbuf()); 00054 g_env.PrintInternal(" connected.\n"); 00055 while(m_stopExec) { 00056 if( GetStartChar() ){ 00057 if( !GetStream() ) return; 00058 ParsePacket(); 00059 ExecDebug(); 00060 } 00061 } 00062 }
関数の呼び出しグラフ:
DebugStub::~DebugStub | ( | ) |
void DebugStub::OnExec | ( | EmulationDebugOp * | op | ) |
DebugStub.cpp の 501 行で定義されています。
参照先 Onikiri::SystemBase::SystemContext::architectureStateList・Onikiri::EmulationDebugOp::GetMemAccess()・Onikiri::OpInfo::GetOpClass()・Onikiri::EmulationOp::GetOpInfo()・Onikiri::OpClass::IsLoad()・Onikiri::OpClass::IsStore().
参照元 Onikiri::EmulationDebugSystem::Run().
00502 { 00503 do { // Wait for commands from gdb in this loop 00504 if(m_stopCount > 0){ // step exec 00505 if(m_stopCount == 1){ 00506 m_stopExec = true; 00507 SendPacket("S05"); 00508 } 00509 m_stopCount--; 00510 } 00511 if(!m_stopExec){ // Software Breakpoint 00512 if (m_breakpoint.find(m_context->architectureStateList[m_pid].pc.address) != m_breakpoint.end()) // Z0 00513 { 00514 m_stopExec = true; 00515 SendPacket("S05"); 00516 } 00517 else if (op->GetOpInfo()->GetOpClass().IsLoad()) // Z3, Z4 00518 { 00519 MemAccess access = op->GetMemAccess(); 00520 for (WatchList::iterator i = m_watchRead.begin(); i != m_watchRead.end(); i++) 00521 { 00522 if (IsAddressOverlap(access,*i)) 00523 { 00524 m_stopExec = true; 00525 SendPacket("S05"); 00526 } 00527 } 00528 for (WatchList::iterator i = m_watchAccess.begin(); i != m_watchAccess.end(); i++) 00529 { 00530 if (IsAddressOverlap(access,*i)) 00531 { 00532 m_stopExec = true; 00533 SendPacket("S05"); 00534 } 00535 } 00536 } 00537 else if (op->GetOpInfo()->GetOpClass().IsStore()) // Z2, Z4 00538 { 00539 MemAccess access = op->GetMemAccess(); 00540 for (WatchList::iterator i = m_watchWrite.begin(); i != m_watchWrite.end(); i++) 00541 { 00542 if (IsAddressOverlap(access,*i)) 00543 { 00544 m_stopExec = true; 00545 SendPacket("S05"); 00546 } 00547 } 00548 for (WatchList::iterator i = m_watchAccess.begin(); i != m_watchAccess.end(); i++) 00549 { 00550 if (IsAddressOverlap(access,*i)) 00551 { 00552 m_stopExec = true; 00553 SendPacket("S05"); 00554 } 00555 } 00556 } 00557 } 00558 if( GetStartChar() ){ 00559 if( !GetStream() ) return; 00560 ParsePacket(); 00561 ExecDebug(); 00562 } 00563 }while(m_stopExec); 00564 }
関数の呼び出しグラフ:
Here is the caller graph for this function: