This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/15075] New: dprintf inteferes with "next"


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]