symtab/2131: DW_FORM_strp pointing outside of .debug_str section

drow@sources.redhat.com drow@sources.redhat.com
Sun Jun 24 20:25:00 GMT 2007


Synopsis: DW_FORM_strp pointing outside of .debug_str section

State-Changed-From-To: open->closed
State-Changed-By: drow
State-Changed-When: Sun Jun 24 20:25:15 2007
State-Changed-Why:
    The submitter sent me a testcase privately.  Here's the problem:
    
      [3775] .debug_aranges    PROGBITS        00000000 e37201 00e060 00      0   0  1
      [3776] .debug_str        PROGBITS        00000000 e45261 038b60 00      0   0  1
      [3777] .debug_ranges     PROGBITS        00000000 e7ddc1 000150 00      0   0  1
      [3778] .debug_str        PROGBITS        00000000 e7df11 00035b 01  MS  0   0  1
    
    There are two .debug_str sections!  The last compilation unit in .debug_info references the second .debug_str section, all the others reference the first.  There is nothing in the debug info to specify which section should be used.
    
    I believe that DBX happens to pick the first section named .debug_str.  We choose the second; it is the smaller one, so many offsets are invalid.
    
    The binary is broken; this is probably caused by mixed inputs to the Sun linker, which combines sections less aggressively than GNU ld.

http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2131



More information about the Gdb-prs mailing list