When I tried to debug the linker from default binutils build, I got (gdb) b map_sections_to_segments Function "map_sections_to_segments" not defined. From readelf -w, I see <1><a7e8>: Abbrev Number: 75 (DW_TAG_subprogram) DW_AT_sibling : <a97e> DW_AT_name : (indirect string, offset: 0x6801): map_sections_to_segments DW_AT_decl_file : 1 DW_AT_decl_line : 3405 DW_AT_prototyped : 1 DW_AT_type : <942> DW_AT_inline : 1 (inlined) The line number looks right. Gdb should be able to figure something out.
FYI, Intel't idb has no problem with it.
Created attachment 113572 [details] A testcase [hjl@gnu-10 inline]$ make /usr/gcc-4.0/bin/gcc -O2 -g -o x x.c [hjl@gnu-10 inline]$ gdb x GNU gdb 6.3.0.20050201-cvs Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) b foo Function "foo" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) q [hjl@gnu-10 inline]$ /opt/intel/idb80/bin/idb -gdb x Linux Application Debugger for 32-bit applications, Version 8.1-7, Build 20050128 ------------------ object file name: x Reading symbols from /export/home/hjl/bugs/gcc/debug/inline/x...done. (idb) b foo Breakpoint 1 at 0x8048371: file x.c, line 11. (idb) r Starting program: /export/home/hjl/bugs/gcc/debug/inline/x Breakpoint 1, foo (x=Info: symbol x is defined but not allocated (optimized away) <no value>) at x.c:11 11 printf ("%d\n", y); (idb) bt #0 0x08048371 in inlined foo (x=Info: symbol x is defined but not allocated (optimized away) <no value>) at x.c:11 #1 in main () at x.c:27 #2 0x4e11be33 in __libc_start_main () in /lib/tls/libc-2.3.4.so #3 0x080482e1 in _start () in /export/home/hjl/bugs/gcc/debug/inline/x (idb)
Confirming this feature is not present, neither in upstream CVS: dwarf2read.c: process_die (): case DW_TAG_inlined_subroutine: /* FIXME: These are ignored for now. They could be used to set breakpoints on all inlined instances of a function and make GDB `next' properly over inlined functions. */ break;
*** Bug 149126 has been marked as a duplicate of this bug. ***
This is an upstream problem; close the bug with category "UPSTREAM".
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Just a tad over 3 years . . . can this be closed out or should it be re-prioritized for recent Fedora development?
It is still a valid Bug, it is occasionally discussed as one of the next TODO items.
(gdb) b foo Breakpoint 1 at 0x400444: file x.c, line 11. (gdb) r Starting program: /tmp/foodir/x Breakpoint 1, main () at x.c:30 30 i = foo (1); (gdb) bt #0 main () at x.c:30 (gdb) p/x $pc $1 = 0x400444 (gdb) step foo (x=1) at x.c:11 11 printf ("%d\n", y); (gdb) p/x $pc $2 = 0x400444 (gdb) bt #0 foo (x=1) at x.c:11 #1 main () at x.c:30 (gdb) Fixed by Gary Benson in 2012