Add an indent parameter to DumpMemory().
- Adjust callers.
This commit is contained in:
parent
ec7c59ca09
commit
9a4802db55
@ -120,7 +120,7 @@ CliDumpMemoryCommand::Execute(int argc, const char* const* argv,
|
||||
printf("\"\n");
|
||||
} else {
|
||||
BString output;
|
||||
UiUtils::DumpMemory(output, block, address, itemSize, displayWidth,
|
||||
UiUtils::DumpMemory(output, 0, block, address, itemSize, displayWidth,
|
||||
num);
|
||||
printf("%s\n", output.String());
|
||||
}
|
||||
|
@ -230,19 +230,23 @@ UiUtils::PrintValueNodeGraph(BString& _output, ValueNodeChild* child,
|
||||
}
|
||||
|
||||
|
||||
/*static*/ void UiUtils::DumpMemory(BString& _output, TeamMemoryBlock* block,
|
||||
target_addr_t address, int32 itemSize, int32 displayWidth, int32 count)
|
||||
/*static*/ void UiUtils::DumpMemory(BString& _output, int32 indentLevel,
|
||||
TeamMemoryBlock* block, target_addr_t address, int32 itemSize,
|
||||
int32 displayWidth, int32 count)
|
||||
{
|
||||
BString data;
|
||||
|
||||
int32 j;
|
||||
_output.Append('\t', indentLevel);
|
||||
for (int32 i = 0; i < count; i++) {
|
||||
uint8* value;
|
||||
|
||||
if ((i % displayWidth) == 0) {
|
||||
int32 displayed = min_c(displayWidth, (count-i)) * itemSize;
|
||||
if (i != 0)
|
||||
if (i != 0) {
|
||||
_output.Append("\n");
|
||||
_output.Append('\t', indentLevel);
|
||||
}
|
||||
|
||||
data.SetToFormat("[%#" B_PRIx64 "] ", address + i * itemSize);
|
||||
_output += data;
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
int32 indentLevel, int32 maxDepth);
|
||||
|
||||
static void DumpMemory(BString& _output,
|
||||
int32 indentLevel,
|
||||
TeamMemoryBlock* block,
|
||||
target_addr_t address, int32 itemSize,
|
||||
int32 displayWidth, int32 count);
|
||||
|
Loading…
Reference in New Issue
Block a user