Debugger: Finish handling of missing debug information.

Add a listener interface for LoadImageDebugInfoJob that allows it to request
user assistance based on its current state. Adjust callers to pass in said
listener accordingly.

Implement the aforementioned listener interface in TeamDebugger, and use the
loading state handler roster to find the appropriate handler / handle the request.

This implements most of what's needed for #10138, the main piece still missing
is for the dwarf handler to detect whether the image in question comes from a package,
and if so, to offer to install the corresponding debug information package rather than
locating the file manually, assuming such a package exists.
This commit is contained in:
Rene Gollent
2014-06-15 11:03:24 -04:00
parent 331511009c
commit d44d8207a8
7 changed files with 133 additions and 21 deletions
@@ -1,6 +1,6 @@
/*
* Copyright 2009-2012, Ingo Weinhold, [email protected].
* Copyright 2010-2013, Rene Gollent, [email protected].
* Copyright 2010-2014, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
@@ -44,11 +44,13 @@ enum {
ThreadHandler::ThreadHandler(Thread* thread, Worker* worker,
DebuggerInterface* debuggerInterface,
ImageDebugInfoJobListener* listener,
BreakpointManager* breakpointManager)
:
fThread(thread),
fWorker(worker),
fDebuggerInterface(debuggerInterface),
fDebugInfoJobListener(listener),
fBreakpointManager(breakpointManager),
fStepMode(STEP_NONE),
fStepStatement(NULL),
@@ -376,7 +378,8 @@ ThreadHandler::HandleCpuStateChanged()
if (fThread->GetCpuState() != NULL && fThread->GetStackTrace() == NULL) {
fWorker->ScheduleJob(
new(std::nothrow) GetStackTraceJob(fDebuggerInterface,
fDebuggerInterface->GetArchitecture(), fThread));
fDebugInfoJobListener, fDebuggerInterface->GetArchitecture(),
fThread));
}
}