Cleanups.

This commit is contained in:
Rene Gollent
2012-11-22 11:44:20 -05:00
parent 19ea0235be
commit 2bf866783c
2 changed files with 8 additions and 23 deletions
@@ -120,8 +120,8 @@ DebugReportGenerator::_DumpLoadedImages(BString& _output)
target_addr_t dataBase = info.DataBase();
data.SetToFormat("\t%s (%" B_PRId32 ", %s) "
"Text: 0x%08" B_PRIx64 " - 0x%08" B_PRIx64 ", Data: 0x%08"
B_PRIx64 " - 0x%08" B_PRIx64 "\n", info.Name().String(),
"Text: %#08" B_PRIx64 " - %#08" B_PRIx64 ", Data: %#08"
B_PRIx64 " - %#08" B_PRIx64 "\n", info.Name().String(),
info.ImageID(), UiUtils::ImageTypeToString(info.Type(),
buffer, sizeof(buffer)), textBase,
textBase + info.TextSize(), dataBase,
@@ -183,7 +183,7 @@ DebugReportGenerator::_DumpDebuggedThreadInfo(BString& _output, Thread* thread)
BString data;
for (int32 i = 0; StackFrame* frame = trace->FrameAt(i); i++) {
char functionName[512];
data.SetToFormat("\t\t0x%08" B_PRIx64 "\t0x%08" B_PRIx64 "\t%s\n",
data.SetToFormat("\t\t%#08" B_PRIx64 "\t%#08" B_PRIx64 "\t%s\n",
frame->FrameAddress(), frame->InstructionPointer(),
UiUtils::FunctionNameForFrame(frame, functionName,
sizeof(functionName)));
@@ -11,9 +11,9 @@
#include <AutoLocker.h>
#include "CliContext.h"
#include "FunctionInstance.h"
#include "StackTrace.h"
#include "Team.h"
#include "UiUtils.h"
CliStackTraceCommand::CliStackTraceCommand()
@@ -63,24 +63,9 @@ CliStackTraceCommand::Execute(int argc, const char* const* argv,
printf("%3" B_PRId32 " %#" B_PRIx64 " %#" B_PRIx64, i,
(uint64)frame->FrameAddress(), (uint64)frame->InstructionPointer());
Image* image = frame->GetImage();
FunctionInstance* function = frame->Function();
if (image == NULL && function == NULL) {
printf(" ???\n");
continue;
}
BString name;
target_addr_t baseAddress;
if (function != NULL) {
name = function->PrettyName();
baseAddress = function->Address();
} else {
name = image->Name();
baseAddress = image->Info().TextBase();
}
printf(" %s + %#" B_PRIx64 "\n", name.String(),
uint64(frame->InstructionPointer() - baseAddress));
char functionName[512];
UiUtils::FunctionNameForFrame(frame, functionName,
sizeof(functionName));
printf(" %s\n", functionName);
}
}