Re: Debugging kernel with gdb
ori-C8/[email protected] Thu, 05 Jun 2025 15:01:10 -0400
| Newsgroups | gmane.os.9front.general,gmane.os.plan9.general |
|---|---|
| Message-ID | <[email protected]> |
Quoth Paul Lalonde <[email protected]>: > I'm debugging Nix's reboot code. The good news is that a straight reboot > now works. The bad news is that jumping to a new kernel does not. It > looks like it's dying in the reboot trampoline, which points to some > mis-managed expectation about machine state (page table, gdt?). > > I'm trying to debug this with qemu and gdb, but though the elf generated by > 'mk 9pc64.elf' is enough to run gdb and connect to the qemu-hosted kernel, > it has no debug symbols. Operating with addresses gleaned from a .lst file > is less than pleasant. > > Is there a way to generate symbols for functions in the .elf? > > Thanks, > Paul > I don't believe there is. It may be interesting to implement a /proc-compatible interface that talks to gdb stubs for this kind of thing; then we could point acid at any gdb remote server and go.