[Bug symtab/21695] New: Loss of line info

thopre01 at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Fri Jun 30 12:39:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21695

            Bug ID: 21695
           Summary: Loss of line info
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: thopre01 at gcc dot gnu.org
  Target Milestone: ---

Hi,

Using a trunk gdb built with:

./configure --target=arm-none-eabi --disable-nls --disable-sim --disable-gas
--disable-binutils --disable-ld --disable-gprof --with-libexpat --with-lzma=no
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --with-python=no


When loading the gdb_test.elf file attached to this ticket
(https://bugs.launchpad.net/gcc-arm-embedded/+bug/1700646), the following
occurs:

$ ../build-gdb/build-gdb-1/gdb/gdb
GNU gdb (GDB) 8.0.50.20170614-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) add-symbol-file gdb_test.elf 0x1fff0000 add symbol table from file
"gdb_test.elf" at
        .text_addr = 0x1fff0000
(y or n) y
Reading symbols from gdb_test.elf...done.
(gdb) info line main
No line number information available for address 0x1fff0000 <main>
(gdb) 


When the same elf file is run with gdb 7.8 built with the same configure, one
gets:

$ build-gdb-7-8/gdb/gdb
GNU gdb (GDB) 7.8.2.20150113-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) add-symbol-file gdb_test.elf 0x1fff0000 add symbol table from file
"gdb_test.elf" at
        .text_addr = 0x1fff0000
(y or n) y
Reading symbols from gdb_test.elf...done.
(gdb) info line main
Line 76 of "main.c" starts at address 0x1fff0000 <main> and ends at
0x1fff0006 <main+6>.
(gdb) 


So with the same configuration and object file, GDB 7.8 manages to display line
info but not trunk GDB.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list