20 #include "pedigree/kernel/debugger/commands/DisassembleCommand.h" 21 #include "pedigree/kernel/linker/KernelElf.h" 22 #include "pedigree/kernel/processor/Disassembler.h" 23 #include "pedigree/kernel/processor/state.h" 24 #include "pedigree/kernel/processor/types.h" 25 #include "pedigree/kernel/utilities/demangle.h" 27 DisassembleCommand::DisassembleCommand()
31 DisassembleCommand::~DisassembleCommand()
50 if (input ==
"disassemble")
51 address = state.getInstructionPointer();
55 address = input.uintptrValue();
61 output =
"Not a valid address or symbol name: `";
69 size_t nInstructions = 10;
78 for (
size_t i = 0; i < nInstructions; i++)
86 uintptr_t symStart = 0;
89 if (location == symStart)
92 output.append(location, 16, 8,
'0');
95 output.append(location, 16, 16,
'0');
105 output.append(location, 16, 8,
' ');
108 output.append(location, 16, 16,
' ');
static KernelElf & instance()
bool execute(const HugeStaticString &input, HugeStaticString &output, InterruptState &state, DebuggerIO *screen)
void autocomplete(const HugeStaticString &input, HugeStaticString &output)
void setMode(size_t nMode)
uintptr_t globalLookupSymbol(const char *pName)
const NormalStaticString getString()
void setLocation(uintptr_t nLocation)
void disassemble(LargeStaticString &text)