This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/15075] New: dprintf inteferes with "next"
- From: "tromey at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 28 Jan 2013 18:49:55 +0000
- Subject: [Bug breakpoints/15075] New: dprintf inteferes with "next"
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15075
Bug #: 15075
Summary: dprintf inteferes with "next"
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: breakpoints
AssignedTo: unassigned@sourceware.org
ReportedBy: tromey@redhat.com
Classification: Unclassified
Debug this simple program:
barimba. nl -ba q.c
1 int main()
2 {
3 int x = 5;
4
5 ++x;
6 ++x;
7
8 return x - 7;
9 }
Now put a dprintf on line 6:
(gdb) dprintf q.c:6, "%d\n", x
Dprintf 1 at 0x400483: file q.c, line 6.
Now "start" and try "next"ing through the program.
Once the dprintf is hit, "next" will act like "continue".
This is a bug in how dprintf is implemented.
(gdb) start
Temporary breakpoint 2 at 0x400478: file q.c, line 3.
Starting program: /tmp/q
Temporary breakpoint 2, main () at q.c:3
3 int x = 5;
(gdb) n
5 ++x;
(gdb)
6
[Inferior 1 (process 15434) exited normally]
[Inferior 15434 exited]
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.