This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/17036] breakpoint reported on wrong line number
- From: "donbreazeal at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 02 Nov 2015 18:31:28 +0000
- Subject: [Bug breakpoints/17036] breakpoint reported on wrong line number
- Auto-submitted: auto-generated
- References: <bug-17036-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17036
Don Breazeal <donbreazeal at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |donbreazeal at gmail dot com
--- Comment #1 from Don Breazeal <donbreazeal at gmail dot com> ---
Some other manifestations of this issue:
* set a breakpoint on a blank line, then the breakpoint is set on the first
line of the next function (that has line info)
* build a program containing an unused function with '-ffunction-sections
-fdata-sections -Wl,--gc-sections', and set a breakpoint in the unused
function. the breakpoint will be set on the first line of the next function
(that has line info).
You can see this with the program in the attached file unused.tgz:
Reading symbols from ./unused...done.
(gdb) list
6 printf ("unused\n");
7 return;
8 }
9
10 void
11 print_hello (void)
12 {
13 printf ("hello\n");
14 return;
15 }
(gdb) b 6
Breakpoint 1 at 0x4004ce: file unused.c, line 6.
(gdb) r
Starting program: /scratch/dbreazea/sandbox/test/unused/unused
Breakpoint 1, print_hello () at unused.c:13
13 printf ("hello\n");
The same thing happens if you set the breakpoint on line 9, a blank line.
--
You are receiving this mail because:
You are on the CC list for the bug.