Bug 149125
Summary: | FEAT: Gdb can't set break point at inlined function | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | H.J. Lu <hongjiu.lu> | ||||
Component: | gdb | Assignee: | Jan Kratochvil <jan.kratochvil> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | gbenson, jan.kratochvil | ||||
Target Milestone: | --- | Keywords: | FutureFeature | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Enhancement | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-03-21 19:11:18 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 418441 | ||||||
Attachments: |
|
Description
H.J. Lu
2005-02-18 23:18:46 UTC
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 |