[syslinux] Can't get COM32 + GDB to work

Sebastian Herbszt herbszt at gmx.de
Thu May 20 14:40:27 PDT 2010


Sebastian Herbszt wrote:
> Don Hiatt wrote:
>> [Sorry, I sent this reply to hpa (sorry) instead of the list]
> 
> <snip>
> 
>> Breakpoints still don't work. Here is the gdb session. From syslinux's
>> "boot:" I type "/boot/hello" and it runs but doesn't trigger the
>> breakpoint in main().
>> 
>> 
>> Reading symbols from /export/devel/syslinux/core/extlinux.elf...done.
>> (gdb) target remote localhost:1234
>> Remote debugging using localhost:1234
>> 0x000f1996 in ?? ()
>> (gdb) add-symbol-file com32/samples/hello.elf free_high_memory
>> add symbol table from file "com32/samples/hello.elf" at
>>        .text_addr = 0x0
>> (y or n) y
>> Reading symbols from /export/devel/syslinux/com32/samples/hello.elf...done.
>> (gdb) b hello.c:main
>> Breakpoint 1 at 0xa4: file hello.c, line 24.
> 
> Does 0xa4 look correct? Shouldn't it be somewhere above free_high_memory?

$ objdump -x core/pxelinux.elf | grep free_high_memory
00160000 g       *ABS*  00000000 free_high_memory

(gdb) file core/pxelinux.elf
(gdb) target remote ...
(gdb) add-symbol-file com32/samples/hello.elf 0x00160000
add symbol table from file "com32/samples/hello.elf" at
        .text_addr = 0x160000
(y or n) y
(gdb) break hello.c:main
Breakpoint 1 at 0x160000: file hello.c, line 24.
(gdb) c
Continuing.

Breakpoint 1, main (argc=28628, argv=0x0) at hello.c:24
24      {
Current language:  auto
The current source language is "auto; currently c".
(gdb)

This seems to work with Bochs. If i use "free_high_memory" instead of
0x00160000 it doesn't.

Sebastian




More information about the Syslinux mailing list