Debugger: Always include disassembly/frame dump in reports.

This commit is contained in:
Rene Gollent 2013-12-04 18:10:14 -05:00
parent acaa4271a2
commit 9fa5a2f925

View File

@ -466,20 +466,20 @@ DebugReportGenerator::_DumpDebuggedThreadInfo(BString& _output,
sizeof(functionName)));
_output << data;
if (frame->CountParameters() == 0
&& frame->CountLocalVariables() == 0) {
// only dump the topmost frame
if (i == 0) {
locker.Unlock();
_DumpFunctionDisassembly(_output, frame->InstructionPointer());
_DumpStackFrameMemory(_output, thread->GetCpuState(),
frame->FrameAddress(), thread->GetTeam()->GetArchitecture()
->StackGrowthDirection());
locker.Lock();
}
continue;
// only dump the topmost frame
if (i == 0) {
locker.Unlock();
_DumpFunctionDisassembly(_output, frame->InstructionPointer());
_DumpStackFrameMemory(_output, thread->GetCpuState(),
frame->FrameAddress(), thread->GetTeam()->GetArchitecture()
->StackGrowthDirection());
locker.Lock();
}
if (frame->CountParameters() == 0 && frame->CountLocalVariables() == 0)
continue;
_output << "\t\t\tVariables:\n";
status_t result = fNodeManager->SetStackFrame(thread, frame);
if (result != B_OK)
@ -538,6 +538,10 @@ DebugReportGenerator::_DumpFunctionDisassembly(BString& _output,
if (code == NULL) {
switch (function->SourceCodeState()) {
case FUNCTION_SOURCE_NOT_LOADED:
case FUNCTION_SOURCE_LOADED:
// FUNCTION_SOURCE_LOADED is included since, if we entered
// here, it implies that the high level source for the
// function has been loaded, but the disassembly has not.
function->AddListener(this);
fSourceWaitingFunction = function;
fListener->FunctionSourceCodeRequested(instance, true);