[syslinux] How do I =?utf-8?Q?debug=C2=A0com32_?=modules with GDB using DWARF format?

Tu Do tuhdo1710 at gmail.com
Thu Oct 5 08:48:45 PDT 2017


Hi list,

I ran a syslinux drive on a QEMU machine with a gdbstub opened. I tried the simplest modules: the hello.c in com32/samples/ directory, which is compiled into hello.c32 in bios/com32/samples/. I already compiled the module with debug info attached via -g option added to CFLAGS in the Makefile.

However, the problem is that the generated module is a shared dynamic module, which only contains relative address. Because of this, the generated debug info is also wrong because the actual addresses are absolute addresses and the debug info must match them.

How do I fix this problem? Is there a way to generate the correct mapping at compile time, so I can feed it to GDB when it starts?

Thanks.



More information about the Syslinux mailing list