Posts

Showing posts with the label gdb

gdb add-symbol-file all sections and load address

gdb add-symbol-file all sections and load address I'm debugging a boot loader (syslinux) with gdb and the gdb-stub of qemu. At some point the main file load a shared object ldlinux.elf . ldlinux.elf I would like to add the symbols in gdb for that file. The command add-symbol-file seems like the way to go. However, as a relocatable file, I have to specify the memory address it has been loaded at. And here comes the problem. add-symbol-file Although I know the base address at which the LOAD segment has been loaded at, add-symbol-file works section-wise and want me to specify the address at which each section has been loaded. LOAD add-symbol-file Can I tell gdb to load all the symbols of all the sections provided that I specify the base address of the file in memory? Does the behavior of gdb make sens? The section headers aren't used for running an ELF and are even optional. I can't see a use case where specifying the load address of the sections would be useful. Here are t...