Debugger: Always include disassembly/frame dump in reports.

This commit is contained in:
Rene Gollent
2013-12-04 18:12:40 -05:00
parent acaa4271a2
commit 9fa5a2f925
@@ -466,20 +466,20 @@ DebugReportGenerator::_DumpDebuggedThreadInfo(BString& _output,
sizeof(functionName))); sizeof(functionName)));
_output << data; _output << data;
if (frame->CountParameters() == 0
&& frame->CountLocalVariables() == 0) { // only dump the topmost frame
// only dump the topmost frame if (i == 0) {
if (i == 0) { locker.Unlock();
locker.Unlock(); _DumpFunctionDisassembly(_output, frame->InstructionPointer());
_DumpFunctionDisassembly(_output, frame->InstructionPointer()); _DumpStackFrameMemory(_output, thread->GetCpuState(),
_DumpStackFrameMemory(_output, thread->GetCpuState(), frame->FrameAddress(), thread->GetTeam()->GetArchitecture()
frame->FrameAddress(), thread->GetTeam()->GetArchitecture() ->StackGrowthDirection());
->StackGrowthDirection()); locker.Lock();
locker.Lock();
}
continue;
} }
if (frame->CountParameters() == 0 && frame->CountLocalVariables() == 0)
continue;
_output << "\t\t\tVariables:\n"; _output << "\t\t\tVariables:\n";
status_t result = fNodeManager->SetStackFrame(thread, frame); status_t result = fNodeManager->SetStackFrame(thread, frame);
if (result != B_OK) if (result != B_OK)
@@ -538,6 +538,10 @@ DebugReportGenerator::_DumpFunctionDisassembly(BString& _output,
if (code == NULL) { if (code == NULL) {
switch (function->SourceCodeState()) { switch (function->SourceCodeState()) {
case FUNCTION_SOURCE_NOT_LOADED: 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); function->AddListener(this);
fSourceWaitingFunction = function; fSourceWaitingFunction = function;
fListener->FunctionSourceCodeRequested(instance, true); fListener->FunctionSourceCodeRequested(instance, true);