public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/15645] New: Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location
@ 2013-06-18 18:33 simon.marchi at ericsson dot com
2013-06-18 19:36 ` [Bug gdb/15645] " gbenson at redhat dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: simon.marchi at ericsson dot com @ 2013-06-18 18:33 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15645
Bug ID: 15645
Summary: Setting a breakpoint in a function marked with
__attribute__((always_inline)) with multiple locations
only sets it at the first location
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: simon.marchi at ericsson dot com
Created attachment 7084
--> http://sourceware.org/bugzilla/attachment.cgi?id=7084&action=edit
Snippet to reproduce
Steps to reproduce (see attached file):
$ gcc inline.c -g
$ gdb ./a.out
Reading symbols from /home/simark/a.out...done.
(gdb) break 5
Breakpoint 1 at 0x40053b: file inline.c, line 5.
(gdb) break func
Note: breakpoint 1 also set at pc 0x40053b.
Breakpoint 2 at 0x40053b: func. (3 locations)
(gdb) quit
The function "func" is forced to be inline, and therefore its body appears 3
times directly in the main. The command "break 5" only sets a breakpoint at the
first of these locations. The expected result is that it sets a breakpoint at
all 3 locations.
Note that doing "break func" puts a breakpoint in all 3 locations.
>From what I saw, when it is a function that is inlined but without
((always_inline)), the behaviour is correct.
Maybe related, the output of "info breakpoints" is not ideal.
1 breakpoint keep y <MULTIPLE>
1.1 y 0x000000000040053b in main at inline.c:5
1.2 y 0x0000000000400556 <main+42>
1.3 y 0x0000000000400571 <main+69>
For locations 2 and 3, we have <main+X>, but it should be similar to location
1, "in main at inline.c:5.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/15645] Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location
2013-06-18 18:33 [Bug gdb/15645] New: Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location simon.marchi at ericsson dot com
@ 2013-06-18 19:36 ` gbenson at redhat dot com
2013-10-09 9:10 ` gbenson at redhat dot com
2024-01-04 13:35 ` ssbssa at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: gbenson at redhat dot com @ 2013-06-18 19:36 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15645
Gary Benson <gbenson at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gbenson at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/15645] Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location
2013-06-18 18:33 [Bug gdb/15645] New: Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location simon.marchi at ericsson dot com
2013-06-18 19:36 ` [Bug gdb/15645] " gbenson at redhat dot com
@ 2013-10-09 9:10 ` gbenson at redhat dot com
2024-01-04 13:35 ` ssbssa at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: gbenson at redhat dot com @ 2013-10-09 9:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=15645
--- Comment #1 from Gary Benson <gbenson at redhat dot com> ---
Confirmed with 7.6.50.20131009-cvs
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/15645] Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location
2013-06-18 18:33 [Bug gdb/15645] New: Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location simon.marchi at ericsson dot com
2013-06-18 19:36 ` [Bug gdb/15645] " gbenson at redhat dot com
2013-10-09 9:10 ` gbenson at redhat dot com
@ 2024-01-04 13:35 ` ssbssa at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: ssbssa at sourceware dot org @ 2024-01-04 13:35 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=15645
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |MOVED
CC| |ssbssa at sourceware dot org
--- Comment #2 from Hannes Domani <ssbssa at sourceware dot org> ---
I think this was a debug info problem on gcc side, since I can reproduce this
when compiling with gcc-8.3.0 or older, but not when compiling with gcc-9.3.0
or newer.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-04 13:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18 18:33 [Bug gdb/15645] New: Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location simon.marchi at ericsson dot com
2013-06-18 19:36 ` [Bug gdb/15645] " gbenson at redhat dot com
2013-10-09 9:10 ` gbenson at redhat dot com
2024-01-04 13:35 ` ssbssa at sourceware dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).