[syslinux] Debugging

H. Peter Anvin hpa at zytor.com
Tue Jun 24 10:56:22 PDT 2008


Ferenc Wagner wrote:
> Hi!
> 
> It's indeed better to open a new thread for this.  So, here's my test
> session:
> 
> $ qemu -fda extlinux.144 -s -S
> 
> Then in another terminal:
> 
> $ gdb extlinux.elf
> (gdb) set architecture i8086 
> (gdb) target remote localhost:1234
> Remote debugging using localhost:1234
> 0x0000fff0 in ?? () at localboot.inc:68
> 68			jmp kaboom			; If we returned, oh boy...
> 
> How does "jmp kaboom" get here?  We are at the BIOS entry point:
> 
> That doesn't either.  Do I ask too much from my good ol' GDB when I
> need a stack trace?  Is there a way I can hint it perhaps?
> 
> Otherwise, I would be interested to read how you debug com32 modules.

Com32 modules is one thing.  Qemu+gdb generally work well with those 
(although you may have to remove -fomit-frame-pointer from the relevant 
C compiler options).

Debugging the core under gdb I find pretty hopeless, because gdb doesn't 
handle segmented memory at all.  As I mentioned, I tend to use the Bochs 
  builtin debugger instead.

Getting a stack trace in the core is also pretty hopeless.  However, 
examining the stack manually can usually tell you were you ended up from.

	-hpa





More information about the Syslinux mailing list