public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/15075] New: dprintf inteferes with "next"
@ 2013-01-28 18:49 tromey at redhat dot com
  2013-02-02 18:43 ` [Bug breakpoints/15075] " qiyao at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: tromey at redhat dot com @ 2013-01-28 18:49 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-09-22 17:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-28 18:49 [Bug breakpoints/15075] New: dprintf inteferes with "next" tromey at redhat dot com
2013-02-02 18:43 ` [Bug breakpoints/15075] " qiyao at gcc dot gnu.org
2013-02-02 20:34 ` tromey at redhat dot com
2013-02-04  2:52 ` qiyao at gcc dot gnu.org
2013-02-04 17:49 ` tromey at redhat dot com
2013-02-04 19:34 ` palves at redhat dot com
2013-02-22 15:22 ` marc.khouzam at ericsson dot com
2013-04-23  7:25 ` teawater at gmail dot com
2013-04-23 15:45 ` teawater at gmail dot com
2013-04-24  3:21 ` teawater at gmail dot com
2013-06-25 11:37 ` cvs-commit at gcc dot gnu.org
2013-06-25 11:42 ` teawater at gmail dot com
2013-06-26  2:32 ` cvs-commit at gcc dot gnu.org
2013-06-26  2:32 ` cvs-commit at gcc dot gnu.org
2014-01-10 16:11 ` marc.khouzam at ericsson dot com
2021-09-22 16:58 ` mervegunesli at aol dot com
2021-09-22 17:00 ` mark at klomp 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).