diff options
| author | hachem <im@hachem.wtf> | 2026-08-29 01:38:42 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-29 01:38:42 +0200 |
| commit | ba64bcc9c38c04bd48e79ac59788b946454f4acb (patch) | |
| tree | 8e8fb771f82127091e43f2dad334e74d6813d10e /src/debugger/types.h | |
| parent | ab021cb74a2b3f0dab3258bf50929912100d1974 (diff) | |
feat: disassembly
Diffstat (limited to 'src/debugger/types.h')
| -rw-r--r-- | src/debugger/types.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/debugger/types.h b/src/debugger/types.h index dec74e5..e288f85 100644 --- a/src/debugger/types.h +++ b/src/debugger/types.h @@ -96,6 +96,11 @@ namespace Hsdbg // set by name, so file and line are whatever lldb found rather than // what was asked for bool by_function = false; + + // set on an instruction, identified by where it sits in the binary so it + // survives the process being restarted somewhere else + bool by_address = false; + uint64_t file_address = 0; }; struct StackFrame @@ -127,4 +132,30 @@ namespace Hsdbg std::string name; uint64_t value = 0; }; + + struct Instruction + { + // where the instruction is right now, which is the load address once a + // process is running and the address in the binary before that + uint64_t address = 0; + + // the same instruction across runs, so a breakpoint can point at it + uint64_t file_address = 0; + + std::string mnemonic; + std::string operands; + std::string comment; + uint32_t size = 0; + + // whether the selected frame is sitting on this one + bool current = false; + }; + + struct Symbol + { + std::string name; + uint64_t file_address = 0; + uint64_t address = 0; + uint64_t size = 0; + }; } |
