vadimcn / codelldb

A native debugger extension for VSCode based on LLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb
MIT License
2.42k stars 237 forks source link

View Binary Data shows "LOADING" during debugging in kernel space through QEMU GDB Stub #1046

Open mempler opened 6 months ago

mempler commented 6 months ago

OS: Windows 11 (WSL2; Ubuntu 22.04) VSCode version: 1.85.1 CodeLLDB version: Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Linker: GNU gold (GNU Binutils for Ubuntu 2.38) 1.16 Debuggee: ELF x86_64 standalone Kernel binary (x86_64-unknown-none-elf)

copts / linker opts linker script

Hex editor only shows "LO AD IN G" during debugging in kernel space through QEMU. note that it works perfectly fine with "type": "cppdbg" from the ms-vscode.cpptools extension.

Verbose log
Initial debug configuration: {
  name: 'Launch QEMU (X64)',
  type: 'lldb',
  preLaunchTask: 'launch_qemu-x64',
  request: 'attach',
  program: '${workspaceFolder}/bazel-bin/kernel/kernel',
  targetCreateCommands: [ 'target create "bazel-bin/kernel/kernel"' ],
  processCreateCommands: [ 'gdb-remote localhost:1234' ],
  sourceMap: { '/proc/self/cwd': '${workspaceFolder}' },
  __configurationTarget: 6
}
Resolved debug configuration: {
  name: 'Launch QEMU (X64)',
  type: 'lldb',
  preLaunchTask: 'launch_qemu-x64',
  request: 'attach',
  program: '${workspaceFolder}/bazel-bin/kernel/kernel',
  targetCreateCommands: [ 'target create "bazel-bin/kernel/kernel"' ],
  processCreateCommands: [ 'gdb-remote localhost:1234' ],
  sourceMap: { '/proc/self/cwd': '${workspaceFolder}' },
  __configurationTarget: 6,
  relativePathBase: '/workspaces/bolt',
  _adapterSettings: {
    displayFormat: 'auto',
    showDisassembly: 'auto',
    dereferencePointers: true,
    suppressMissingSourceFiles: true,
    evaluationTimeout: 5,
    consoleMode: 'commands',
    sourceLanguages: null,
    terminalPromptClear: null,
    evaluateForHovers: true,
    commandCompletions: true,
    reproducer: false
  }
}
liblldb: /home/vscode/.vscode-server/extensions/vadimcn.vscode-lldb-1.10.0/lldb/lib/liblldb.so
environment: {}
settings: { evaluateForHovers: true, commandCompletions: true }
[DEBUG codelldb] Connecting to 127.0.0.1:46225
[DEBUG codelldb] New debug session
[DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true},"type":"request","seq":1}
[DEBUG codelldb::dap_codec] <-- {"seq":1,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"exceptionBreakpointFilters":[{"default":true,"filter":"cpp_throw","label":"C++: on throw","supportsCondition":true},{"default":false,"filter":"cpp_catch","label":"C++: on catch","supportsCondition":true}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsSetVariable":true,"supportsSteppingGranularity":true,"supportsWriteMemoryRequest":true}}
[DEBUG codelldb::dap_codec] --> {"command":"attach","arguments":{"name":"Launch QEMU (X64)","type":"lldb","preLaunchTask":"launch_qemu-x64","request":"attach","program":"/workspaces/bolt/bazel-bin/kernel/kernel","targetCreateCommands":["target create \"bazel-bin/kernel/kernel\""],"processCreateCommands":["gdb-remote localhost:1234"],"sourceMap":{"/proc/self/cwd":"/workspaces/bolt"},"__configurationTarget":6,"relativePathBase":"/workspaces/bolt","_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":5,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":null,"evaluateForHovers":true,"commandCompletions":true,"reproducer":false},"__sessionId":"1ad3eb93-2379-4082-9fbf-ca951221c048"},"type":"request","seq":2}
[INFO  codelldb::debug_session::launch] Set target.source-map args: "/proc/self/cwd" "/workspaces/bolt" 
[DEBUG codelldb::dap_codec] <-- {"seq":2,"type":"event","event":"output","body":{"category":"console","output":"Console is in 'commands' mode, prefix expressions with '?'.\n"}}
INFO(Python) 09:54:32 formatters: Initializing
INFO(Python) 09:54:32 formatters.rust: Initializing
[DEBUG codelldb::dap_codec] <-- {"seq":3,"type":"event","event":"output","body":{"category":"console","output":"Executing script: targetCreateCommands\n"}}
[DEBUG codelldb::debug_session] target create "bazel-bin/kernel/kernel" -> SuccessFinishNoResult, Error:  Success
    Output Message:
    Current executable set to '/workspaces/bolt/bazel-bin/kernel/kernel' (x86_64).

[DEBUG codelldb::debug_session] Debug event: 0x555ab5abc998 Event: broadcaster = 0x555ab5ab9240 (lldb.target), type = 0x00000002 (modules-loaded), data = {kernel}
[DEBUG codelldb::dap_codec] <-- {"seq":4,"type":"event","event":"output","body":{"category":"console","output":"Current executable set to '/workspaces/bolt/bazel-bin/kernel/kernel' (x86_64).\n\n"}}
[DEBUG codelldb::dap_codec] <-- {"seq":5,"type":"event","event":"initialized"}
[DEBUG codelldb::dap_codec] <-- {"seq":6,"type":"event","event":"module","body":{"module":{"addressRange":"FFFFFFFFFFFFFFFF","id":"FFFFFFFFFFFFFFFF","name":"kernel","path":"/workspaces/bolt/bazel-bin/kernel/kernel","symbolFilePath":"/workspaces/bolt/bazel-bin/kernel/kernel","symbolStatus":"Symbols loaded."},"reason":"new"}}
[DEBUG codelldb::dap_codec] --> {"command":"setBreakpoints","arguments":{"source":{"name":"Common.c","path":"/workspaces/bolt/kernel/source/Bootstrap/Common.c"},"lines":[12],"breakpoints":[{"line":12}],"sourceModified":false},"type":"request","seq":3}
[DEBUG codelldb::debug_session] Debug event: 0x555ab5abc998 Event: broadcaster = 0x555ab5ab9240 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 1 type: breakpoint added}
[DEBUG codelldb::dap_codec] <-- {"seq":7,"type":"response","request_seq":3,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"line":12,"message":"Resolved locations: 0","verified":true}]}}
[DEBUG codelldb::dap_codec] --> {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4}
[DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":5}
[DEBUG codelldb::dap_codec] --> {"command":"setInstructionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":6}
[DEBUG codelldb::dap_codec] --> {"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[{"filterId":"cpp_throw"}]},"type":"request","seq":7}
[DEBUG codelldb::dap_codec] <-- {"seq":8,"type":"response","request_seq":4,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
[DEBUG codelldb::dap_codec] <-- {"seq":9,"type":"response","request_seq":5,"success":true,"command":"setDataBreakpoints","body":{"breakpoints":[]}}
[DEBUG codelldb::dap_codec] <-- {"seq":10,"type":"response","request_seq":6,"success":true,"command":"setInstructionBreakpoints","body":{"breakpoints":[]}}
[DEBUG codelldb::dap_codec] <-- {"seq":11,"type":"response","request_seq":7,"success":true,"command":"setExceptionBreakpoints"}
[DEBUG codelldb::debug_session] Debug event: 0x555ab5abc998 Event: broadcaster = 0x555ab5ab9240 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 2 type: breakpoint added}
[DEBUG codelldb::dap_codec] --> {"command":"configurationDone","type":"request","seq":8}
[DEBUG codelldb::dap_codec] <-- {"seq":12,"type":"event","event":"output","body":{"category":"console","output":"Executing script: processCreateCommands\n"}}
[DEBUG codelldb::debug_session] gdb-remote localhost:1234 -> SuccessFinishNoResult, Error:  Success
[DEBUG codelldb::dap_codec] <-- {"seq":13,"type":"event","event":"output","body":{"category":"console","output":"Attached to process 1\n"}}
[DEBUG codelldb::dap_codec] <-- {"seq":14,"type":"response","request_seq":2,"success":true,"command":"attach"}
[DEBUG codelldb::debug_session] Debug event: 0x555ab6abf038 Event: broadcaster = 0x555ab5ab9240 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 1 type: locations resolved}
[DEBUG codelldb::dap_codec] <-- {"seq":15,"type":"response","request_seq":8,"success":true,"command":"configurationDone"}
[DEBUG codelldb::debug_session] Debug event: 0x555ab6ace118 Event: broadcaster = 0x555ab5ab9240 (lldb.target), type = 0x00000002 (modules-loaded), data = {kernel}
[DEBUG codelldb::debug_session] Debug event: 0x555ab6a8d6c0 Event: broadcaster = 0x555ab67c6618 (lldb.process), type = 0x00000001 (state-changed), data = { process = 0x555ab67c65e0 (pid = 1), state = stopped}
[DEBUG codelldb::dap_codec] <-- {"seq":16,"type":"event","event":"breakpoint","body":{"breakpoint":{"id":1,"line":12,"message":"Resolved locations: 1","verified":true},"reason":"changed"}}
[DEBUG codelldb::dap_codec] <-- {"seq":17,"type":"event","event":"module","body":{"module":{"addressRange":"FFFFFFFF80000000","id":"FFFFFFFF80000000","name":"kernel","path":"/workspaces/bolt/bazel-bin/kernel/kernel","symbolFilePath":"/workspaces/bolt/bazel-bin/kernel/kernel","symbolStatus":"Symbols loaded."},"reason":"new"}}
[DEBUG codelldb::dap_codec] <-- {"seq":18,"type":"event","event":"output","body":{"category":"stderr","output":"Stop reason: \n"}}
[DEBUG codelldb::dap_codec] <-- {"seq":19,"type":"event","event":"stopped","body":{"allThreadsStopped":true,"description":"","reason":"unknown","threadId":1}}
[DEBUG codelldb::debug_session] Debug event: 0x555ab6a855f0 Event: broadcaster = 0x555ab67c6618 (lldb.process), type = 0x00000001 (state-changed), data = { process = 0x555ab67c65e0 (pid = 1), state = running}
[DEBUG codelldb::dap_codec] <-- {"seq":20,"type":"event","event":"continued","body":{"allThreadsContinued":true,"threadId":1}}
[DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":9}
[DEBUG codelldb::dap_codec] <-- {"seq":21,"type":"response","request_seq":9,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"1: tid=1"}]}}
[DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":10}
[DEBUG codelldb::dap_codec] <-- {"seq":22,"type":"response","request_seq":10,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"1: tid=1"}]}}
[DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request","seq":11}
[ERROR codelldb::debug_session] Received invalid thread id in stack trace request.
[ERROR codelldb::debug_session] Internal debugger error: Invalid thread id.
[DEBUG codelldb::dap_codec] <-- {"seq":23,"type":"response","request_seq":11,"success":false,"command":"","message":"Internal debugger error: Invalid thread id.","show_user":true}
[DEBUG codelldb::debug_session::breakpoints] Callback for breakpoint location 1.1: where = kernel`CommonStartupRoutine + 16 at Common.c:12:21, address = 0xffffffff80000010, resolved, hit count = 1 

[DEBUG codelldb::debug_session] Debug event: 0x7efe60000ee0 Event: broadcaster = 0x555ab67c6618 (lldb.process), type = 0x00000001 (state-changed), data = { process = 0x555ab67c65e0 (pid = 1), state = stopped}
[DEBUG codelldb::dap_codec] <-- {"seq":24,"type":"event","event":"stopped","body":{"allThreadsStopped":true,"reason":"breakpoint","threadId":1}}
[DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":12}
[DEBUG codelldb::dap_codec] <-- {"seq":25,"type":"response","request_seq":12,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"1: tid=1"}]}}
[DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":1},"type":"request","seq":13}
[DEBUG codelldb::dap_codec] <-- {"seq":26,"type":"response","request_seq":13,"success":true,"command":"stackTrace","body":{"stackFrames":[{"column":21,"id":1001,"instructionPointerReference":"0xFFFFFFFF80000010","line":12,"name":"CommonStartupRoutine","source":{"name":"Common.c","path":"/workspaces/bolt/kernel/source/Bootstrap/Common.c"}}]}}
[DEBUG codelldb::dap_codec] --> {"command":"disassemble","arguments":{"memoryReference":"0xFFFFFFFF80000010","offset":0,"instructionOffset":-50,"instructionCount":50,"resolveSymbols":true},"type":"request","seq":14}
[ERROR codelldb::debug_session] Internal debugger error: memory read failed for 0xffffffff7ffffcf0
[DEBUG codelldb::dap_codec] <-- {"seq":27,"type":"response","request_seq":14,"success":false,"command":"","message":"Internal debugger error: memory read failed for 0xffffffff7ffffcf0","show_user":true}
[DEBUG codelldb::dap_codec] --> {"command":"scopes","arguments":{"frameId":1001},"type":"request","seq":15}
[DEBUG codelldb::dap_codec] <-- {"seq":28,"type":"response","request_seq":15,"success":true,"command":"scopes","body":{"scopes":[{"expensive":false,"name":"Local","variablesReference":1002},{"expensive":false,"name":"Static","variablesReference":1003},{"expensive":false,"name":"Global","variablesReference":1004},{"expensive":false,"name":"Registers","variablesReference":1005}]}}
[DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":1,"levels":19},"type":"request","seq":16}
[DEBUG codelldb::dap_codec] <-- {"seq":29,"type":"response","request_seq":16,"success":true,"command":"stackTrace","body":{"stackFrames":[{"column":5,"id":1006,"instructionPointerReference":"0xFFFFFFFF80000182","line":67,"name":"StartupRoutine","source":{"name":"Limine.c","path":"/workspaces/bolt/kernel/source/Bootstrap/Limine.c"}}]}}
[DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1002},"type":"request","seq":17}
[DEBUG codelldb::dap_codec] <-- {"seq":30,"type":"response","request_seq":17,"success":true,"command":"variables","body":{"variables":[{"evaluateName":"BumpAllocator","memoryReference":"0xFFFF800007F72FB8","name":"BumpAllocator","presentationHint":{"attributes":["readOnly"]},"type":"PAGE_ALLOCATOR *","value":"{AllocatePages:(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1), ...}","variablesReference":1007}]}}
[DEBUG codelldb::dap_codec] --> {"command":"next","arguments":{"threadId":1},"type":"request","seq":18}
[DEBUG codelldb::debug_session] Debug event: 0x555ab5b2bab0 Event: broadcaster = 0x555ab67c6618 (lldb.process), type = 0x00000001 (state-changed), data = { process = 0x555ab67c65e0 (pid = 1), state = running}
[DEBUG codelldb::dap_codec] <-- {"seq":31,"type":"response","request_seq":18,"success":true,"command":"next"}
[DEBUG codelldb::dap_codec] <-- {"seq":32,"type":"event","event":"continued","body":{"allThreadsContinued":true,"threadId":1}}
[DEBUG codelldb::debug_session] Debug event: 0x7efe60001290 Event: broadcaster = 0x555ab67c6618 (lldb.process), type = 0x00000001 (state-changed), data = { process = 0x555ab67c65e0 (pid = 1), state = stopped}
[DEBUG codelldb::dap_codec] <-- {"seq":33,"type":"event","event":"stopped","body":{"allThreadsStopped":true,"reason":"step","threadId":1}}
[DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":19}
[DEBUG codelldb::dap_codec] <-- {"seq":34,"type":"response","request_seq":19,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"1: tid=1"}]}}
[DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":1},"type":"request","seq":20}
[DEBUG codelldb::dap_codec] <-- {"seq":35,"type":"response","request_seq":20,"success":true,"command":"stackTrace","body":{"stackFrames":[{"column":5,"id":1001,"instructionPointerReference":"0xFFFFFFFF8000001E","line":14,"name":"CommonStartupRoutine","source":{"name":"Common.c","path":"/workspaces/bolt/kernel/source/Bootstrap/Common.c"}}]}}
[DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request","seq":21}
[WARN  codelldb::handles] Parent/key combination is not unique (None/[1,0])
[DEBUG codelldb::dap_codec] <-- {"seq":36,"type":"response","request_seq":21,"success":true,"command":"stackTrace","body":{"stackFrames":[{"column":5,"id":1008,"instructionPointerReference":"0xFFFFFFFF8000001E","line":14,"name":"CommonStartupRoutine","source":{"name":"Common.c","path":"/workspaces/bolt/kernel/source/Bootstrap/Common.c"}},{"column":5,"id":1006,"instructionPointerReference":"0xFFFFFFFF80000182","line":67,"name":"StartupRoutine","source":{"name":"Limine.c","path":"/workspaces/bolt/kernel/source/Bootstrap/Limine.c"}}]}}
[DEBUG codelldb::dap_codec] --> {"command":"disassemble","arguments":{"memoryReference":"0xFFFFFFFF8000001E","offset":0,"instructionOffset":-50,"instructionCount":50,"resolveSymbols":true},"type":"request","seq":22}
[ERROR codelldb::debug_session] Internal debugger error: memory read failed for 0xffffffff7ffffcfe
[DEBUG codelldb::dap_codec] <-- {"seq":37,"type":"response","request_seq":22,"success":false,"command":"","message":"Internal debugger error: memory read failed for 0xffffffff7ffffcfe","show_user":true}
[DEBUG codelldb::dap_codec] --> {"command":"scopes","arguments":{"frameId":1001},"type":"request","seq":23}
[DEBUG codelldb::dap_codec] <-- {"seq":38,"type":"response","request_seq":23,"success":true,"command":"scopes","body":{"scopes":[{"expensive":false,"name":"Local","variablesReference":1002},{"expensive":false,"name":"Static","variablesReference":1003},{"expensive":false,"name":"Global","variablesReference":1004},{"expensive":false,"name":"Registers","variablesReference":1005}]}}
[DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1002},"type":"request","seq":24}
[DEBUG codelldb::dap_codec] <-- {"seq":39,"type":"response","request_seq":24,"success":true,"command":"variables","body":{"variables":[{"evaluateName":"BumpAllocator","memoryReference":"0xFFFF800007F72FB8","name":"BumpAllocator","presentationHint":{"attributes":["readOnly"]},"type":"PAGE_ALLOCATOR *","value":"{AllocatePages:(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1), ...}","variablesReference":1007}]}}
[DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":2,"levels":19},"type":"request","seq":25}
[DEBUG codelldb::dap_codec] <-- {"seq":40,"type":"response","request_seq":25,"success":true,"command":"stackTrace","body":{"stackFrames":[]}}
[DEBUG codelldb::dap_codec] --> {"command":"evaluate","arguments":{"expression":"g_PageAllocator","frameId":1001,"context":"hover"},"type":"request","seq":26}
[DEBUG codelldb::dap_codec] <-- {"seq":41,"type":"response","request_seq":26,"success":true,"command":"evaluate","body":{"result":"{AllocatePages:(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1), ...}","type":"PAGE_ALLOCATOR *","variablesReference":1009}}
[DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1009},"type":"request","seq":27}
[DEBUG codelldb::dap_codec] <-- {"seq":42,"type":"response","request_seq":27,"success":true,"command":"variables","body":{"variables":[{"evaluateName":"g_PageAllocator.AllocatePages","memoryReference":"0xFFFFFFFF80004400","name":"AllocatePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_ALLOCATE_PAGES","value":"(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1)","variablesReference":0},{"evaluateName":"g_PageAllocator.FreePages","memoryReference":"0xFFFFFFFF80004408","name":"FreePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_FREE_PAGES","value":"(kernel`BumpAllocator_FreePages at BumpAllocator.c:154:1)","variablesReference":0}]}}
[DEBUG codelldb::dap_codec] --> {"command":"readMemory","arguments":{"count":4096,"memoryReference":"0xFFFFFFFF80004408","offset":0},"type":"request","seq":28}
[ERROR codelldb::debug_session] Internal debugger error: number too large to fit in target type
[DEBUG codelldb::dap_codec] <-- {"seq":43,"type":"response","request_seq":28,"success":false,"command":"","message":"Internal debugger error: number too large to fit in target type","show_user":true}
[DEBUG codelldb::dap_codec] --> {"command":"evaluate","arguments":{"expression":"g_PageAllocator","frameId":1001,"context":"hover"},"type":"request","seq":29}
[DEBUG codelldb::dap_codec] <-- {"seq":44,"type":"response","request_seq":29,"success":true,"command":"evaluate","body":{"result":"{AllocatePages:(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1), ...}","type":"PAGE_ALLOCATOR *","variablesReference":1010}}
[DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1010},"type":"request","seq":30}
[DEBUG codelldb::dap_codec] <-- {"seq":45,"type":"response","request_seq":30,"success":true,"command":"variables","body":{"variables":[{"evaluateName":"g_PageAllocator.AllocatePages","memoryReference":"0xFFFFFFFF80004400","name":"AllocatePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_ALLOCATE_PAGES","value":"(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1)","variablesReference":0},{"evaluateName":"g_PageAllocator.FreePages","memoryReference":"0xFFFFFFFF80004408","name":"FreePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_FREE_PAGES","value":"(kernel`BumpAllocator_FreePages at BumpAllocator.c:154:1)","variablesReference":0}]}}
[DEBUG codelldb::dap_codec] --> {"command":"evaluate","arguments":{"expression":"g_PageAllocator","frameId":1001,"context":"hover"},"type":"request","seq":31}
[DEBUG codelldb::dap_codec] <-- {"seq":46,"type":"response","request_seq":31,"success":true,"command":"evaluate","body":{"result":"{AllocatePages:(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1), ...}","type":"PAGE_ALLOCATOR *","variablesReference":1011}}
[DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1011},"type":"request","seq":32}
[DEBUG codelldb::dap_codec] <-- {"seq":47,"type":"response","request_seq":32,"success":true,"command":"variables","body":{"variables":[{"evaluateName":"g_PageAllocator.AllocatePages","memoryReference":"0xFFFFFFFF80004400","name":"AllocatePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_ALLOCATE_PAGES","value":"(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1)","variablesReference":0},{"evaluateName":"g_PageAllocator.FreePages","memoryReference":"0xFFFFFFFF80004408","name":"FreePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_FREE_PAGES","value":"(kernel`BumpAllocator_FreePages at BumpAllocator.c:154:1)","variablesReference":0}]}}
[DEBUG codelldb::dap_codec] --> {"command":"evaluate","arguments":{"expression":"g_PageAllocator","frameId":1001,"context":"hover"},"type":"request","seq":33}
[DEBUG codelldb::dap_codec] <-- {"seq":48,"type":"response","request_seq":33,"success":true,"command":"evaluate","body":{"result":"{AllocatePages:(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1), ...}","type":"PAGE_ALLOCATOR *","variablesReference":1012}}
[DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1012},"type":"request","seq":34}
[DEBUG codelldb::dap_codec] <-- {"seq":49,"type":"response","request_seq":34,"success":true,"command":"variables","body":{"variables":[{"evaluateName":"g_PageAllocator.AllocatePages","memoryReference":"0xFFFFFFFF80004400","name":"AllocatePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_ALLOCATE_PAGES","value":"(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1)","variablesReference":0},{"evaluateName":"g_PageAllocator.FreePages","memoryReference":"0xFFFFFFFF80004408","name":"FreePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_FREE_PAGES","value":"(kernel`BumpAllocator_FreePages at BumpAllocator.c:154:1)","variablesReference":0}]}}
[DEBUG codelldb::dap_codec] --> {"command":"evaluate","arguments":{"expression":"g_PageAllocator","frameId":1001,"context":"hover"},"type":"request","seq":35}
[DEBUG codelldb::dap_codec] <-- {"seq":50,"type":"response","request_seq":35,"success":true,"command":"evaluate","body":{"result":"{AllocatePages:(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1), ...}","type":"PAGE_ALLOCATOR *","variablesReference":1013}}
[DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1013},"type":"request","seq":36}
[DEBUG codelldb::dap_codec] <-- {"seq":51,"type":"response","request_seq":36,"success":true,"command":"variables","body":{"variables":[{"evaluateName":"g_PageAllocator.AllocatePages","memoryReference":"0xFFFFFFFF80004400","name":"AllocatePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_ALLOCATE_PAGES","value":"(kernel`BumpAllocator_AllocatePages at BumpAllocator.c:77:1)","variablesReference":0},{"evaluateName":"g_PageAllocator.FreePages","memoryReference":"0xFFFFFFFF80004408","name":"FreePages","presentationHint":{"attributes":["readOnly"]},"type":"PA_FREE_PAGES","value":"(kernel`BumpAllocator_FreePages at BumpAllocator.c:154:1)","variablesReference":0}]}}

image

Source code is available at https://github.com/bolt-sys/bolt/tree/84b8c17d75e233f4584f680f50e75f8f8cd31ca6 and can be run & build through docker devcontainers.