Debugger: Cleanup.
ThreadHandler: - Simplify SetBreakpointAndRun() to always use the debugger interface to continue execution, since the latter is now intelligent enough to determine how to handle that in all cases. Adjust callers accordingly.
This commit is contained in:
@@ -1962,7 +1962,7 @@ TeamDebugger::_HandleImageDebugInfoChanged(image_id imageID)
|
||||
SymbolInfo symbolInfo;
|
||||
if (fDebuggerInterface->GetSymbolInfo(fTeam->ID(), image->ID(),
|
||||
"main", B_SYMBOL_TYPE_TEXT, symbolInfo) == B_OK) {
|
||||
handler->SetBreakpointAndRun(symbolInfo.Address(), false);
|
||||
handler->SetBreakpointAndRun(symbolInfo.Address());
|
||||
}
|
||||
} else {
|
||||
locker.Unlock();
|
||||
|
||||
@@ -119,22 +119,15 @@ ThreadHandler::Init()
|
||||
|
||||
|
||||
status_t
|
||||
ThreadHandler::SetBreakpointAndRun(target_addr_t address, bool initialStart)
|
||||
ThreadHandler::SetBreakpointAndRun(target_addr_t address)
|
||||
{
|
||||
status_t error = _InstallTemporaryBreakpoint(address);
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
|
||||
fPreviousInstructionPointer = 0;
|
||||
// when the program is first run, the initial thread is not yet under
|
||||
// the control of the debug nub, so it needs to be resumed rather than
|
||||
// continued.
|
||||
if (initialStart) {
|
||||
resume_thread(ThreadID());
|
||||
// TODO: This should probably better be a DebuggerInterface method,
|
||||
// but this method is used only when debugging a local team anyway.
|
||||
} else
|
||||
fDebuggerInterface->ContinueThread(ThreadID());
|
||||
fDebuggerInterface->ContinueThread(ThreadID());
|
||||
|
||||
// Pretend "step out" mode, so that the temporary breakpoint hit will not
|
||||
// be ignored.
|
||||
fStepMode = STEP_OUT;
|
||||
|
||||
@@ -39,8 +39,7 @@ public:
|
||||
thread_id ThreadID() const { return fThread->ID(); }
|
||||
Thread* GetThread() const { return fThread; }
|
||||
|
||||
status_t SetBreakpointAndRun(target_addr_t address,
|
||||
bool initialStart = true);
|
||||
status_t SetBreakpointAndRun(target_addr_t address);
|
||||
// team lock held
|
||||
|
||||
// All Handle*() methods are invoked in team debugger thread,
|
||||
|
||||
Reference in New Issue
Block a user