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

Don Hiatt donhiatt at gmail.com
Wed May 19 14:26:30 PDT 2010


[Sorry, I sent this reply to hpa (sorry) instead of the list]

On Wed, May 19, 2010 at 1:55 PM, H. Peter Anvin <hpa at zytor.com> wrote:
> On 05/19/2010 01:43 PM, Don Hiatt wrote:
>> On Wed, May 19, 2010 at 12:04 PM, H. Peter Anvin <hpa at zytor.com> wrote:
>>> You need to tell gdb that the module is loaded at an offset:
>>>
>>> gdb core/extlinux.elf
>>> target remote localhost:1234
>>> add-symbol-file com32/samples/hello.elf -s free_high_memory
>>>
>>>        -hpa
>>>
>> Thanks, hpa. Is there another option I'm missing as gdb returns:
>>
>> (gdb) add-symbol-file com32/samples/hello.elf -s free_high_memory
>> USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow]
>> [-s <secname> <addr>]*
>>
>> Sorry, I haven't used this before.
>>
>
> Sorry, drop the -s ... it shouldn't have been there.
>
>        -hpa
>

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.




More information about the Syslinux mailing list