This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

arguments to add-symbol-file



Why when we use 

add-symbol-file <file> 0x1000 0x2000 0x3000

gdb ends up with the following addrs structure, which includes explicit
entries for .text, .data, and .bss section, plus the same 3 entries
repeated in the 'other' array?

Would it make sense to have only the 'other' part, or not include
those three in 'other'?

(top-gdb) p/x *addrs
$35 = {text_addr = 0x1000, data_addr = 0x2000, bss_addr = 0x3000, other = {{
      addr = 0x1000, name = 0x388510, sectindex = 0x0}, {addr = 0x2000, 
      name = 0x388500, sectindex = 0x2}, {addr = 0x3000, name = 0x3884f0, 
      sectindex = 0x3}, {addr = 0x0, name = 0x0, 
      sectindex = 0x0} <repeats 37 times>}}
(top-gdb) p *addrs
$36 = {text_addr = 4096, data_addr = 8192, bss_addr = 12288, other = {{
      addr = 4096, name = 0x388510 ".text", sectindex = 0}, {addr = 8192, 
      name = 0x388500 ".data", sectindex = 2}, {addr = 12288, 
      name = 0x3884f0 ".bss", sectindex = 3}, {addr = 0, name = 0x0, 
      sectindex = 0} <repeats 37 times>}}

Thanks

Elena

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]