Cleanups.
This commit is contained in:
@@ -120,8 +120,8 @@ DebugReportGenerator::_DumpLoadedImages(BString& _output)
|
|||||||
target_addr_t dataBase = info.DataBase();
|
target_addr_t dataBase = info.DataBase();
|
||||||
|
|
||||||
data.SetToFormat("\t%s (%" B_PRId32 ", %s) "
|
data.SetToFormat("\t%s (%" B_PRId32 ", %s) "
|
||||||
"Text: 0x%08" B_PRIx64 " - 0x%08" B_PRIx64 ", Data: 0x%08"
|
"Text: %#08" B_PRIx64 " - %#08" B_PRIx64 ", Data: %#08"
|
||||||
B_PRIx64 " - 0x%08" B_PRIx64 "\n", info.Name().String(),
|
B_PRIx64 " - %#08" B_PRIx64 "\n", info.Name().String(),
|
||||||
info.ImageID(), UiUtils::ImageTypeToString(info.Type(),
|
info.ImageID(), UiUtils::ImageTypeToString(info.Type(),
|
||||||
buffer, sizeof(buffer)), textBase,
|
buffer, sizeof(buffer)), textBase,
|
||||||
textBase + info.TextSize(), dataBase,
|
textBase + info.TextSize(), dataBase,
|
||||||
@@ -183,7 +183,7 @@ DebugReportGenerator::_DumpDebuggedThreadInfo(BString& _output, Thread* thread)
|
|||||||
BString data;
|
BString data;
|
||||||
for (int32 i = 0; StackFrame* frame = trace->FrameAt(i); i++) {
|
for (int32 i = 0; StackFrame* frame = trace->FrameAt(i); i++) {
|
||||||
char functionName[512];
|
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(),
|
frame->FrameAddress(), frame->InstructionPointer(),
|
||||||
UiUtils::FunctionNameForFrame(frame, functionName,
|
UiUtils::FunctionNameForFrame(frame, functionName,
|
||||||
sizeof(functionName)));
|
sizeof(functionName)));
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
#include <AutoLocker.h>
|
#include <AutoLocker.h>
|
||||||
|
|
||||||
#include "CliContext.h"
|
#include "CliContext.h"
|
||||||
#include "FunctionInstance.h"
|
|
||||||
#include "StackTrace.h"
|
#include "StackTrace.h"
|
||||||
#include "Team.h"
|
#include "Team.h"
|
||||||
|
#include "UiUtils.h"
|
||||||
|
|
||||||
|
|
||||||
CliStackTraceCommand::CliStackTraceCommand()
|
CliStackTraceCommand::CliStackTraceCommand()
|
||||||
@@ -63,24 +63,9 @@ CliStackTraceCommand::Execute(int argc, const char* const* argv,
|
|||||||
printf("%3" B_PRId32 " %#" B_PRIx64 " %#" B_PRIx64, i,
|
printf("%3" B_PRId32 " %#" B_PRIx64 " %#" B_PRIx64, i,
|
||||||
(uint64)frame->FrameAddress(), (uint64)frame->InstructionPointer());
|
(uint64)frame->FrameAddress(), (uint64)frame->InstructionPointer());
|
||||||
|
|
||||||
Image* image = frame->GetImage();
|
char functionName[512];
|
||||||
FunctionInstance* function = frame->Function();
|
UiUtils::FunctionNameForFrame(frame, functionName,
|
||||||
if (image == NULL && function == NULL) {
|
sizeof(functionName));
|
||||||
printf(" ???\n");
|
printf(" %s\n", functionName);
|
||||||
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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user