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/15072] New: [Reverse Debugging] if breakpointpresent gdb does not send *stopped event when reverse-finish


http://sourceware.org/bugzilla/show_bug.cgi?id=15072

             Bug #: 15072
           Summary: [Reverse Debugging] if breakpoint present gdb does not
                    send *stopped event when reverse-finish
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: velimir@synopsys.com
    Classification: Unclassified


Hi,

it seems that GDB from version 7.4 until latest tested version 7.5.50.20130128
does not send *stopped event when there is a breakpoint on the calling function
where the reverse-finish will end up.

Additional info can be found at: 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=399103

Consider the following simple program:
======================================
 1 #include <iostream>
 2 using namespace std;
 3
 4 void my_func() {
 5   int a = 10;
 6   a++;
 7   cout << "a=" << a << endl;
 8   return;
 9 }
10
11 int main() {
12   cout << "!!!Hello World!!!" << endl;
13   my_func();
14   return 0;
15 }
======================================

How to reproduce it:
1. Start the debugging.
2. Set breakpoint at line 13.
3. Do "run"/"continue".
6. Do "step".
7. Do reverse-finish.

Here is the output of gdbTrace in Eclipse:
[please note the missing *stopped event in GDB 7.4]

With GDB 7.3:
=============
935,900 48-interpreter-exec --thread 1 --frame 0 console reverse-finish
935,901 ~"Run back to call of #0  my_func () at ../src/Test_Project.cpp:5\n"
935,903 48^running
935,903 *running,thread-id="all"
935,903 (gdb) 
935,903 *stopped
935,904 *running,thread-id="all"
935,904 ~"\nBreakpoint "
935,904 ~"1, main () at ../src/Test_Project.cpp:13\n"
935,906 ~"13\t\tmy_func();\n"
935,906
*stopped,frame={addr="0x00000000004020c2",func="main",args=[],file="../src/Test_Project.cpp",fullname="<PATH_TO_PROJECT/Test_Project/src/Test_Project.cpp",line="13"},thread-id="1",stopped-threads="all",core="2"
935,907 (gdb)
<BLABLABLA>

With GDB 7.4:
=============
104,131 50-interpreter-exec --thread 1 --frame 0 console reverse-finish
104,133 ~"Run back to call of #0  my_func () at ../src/Test_Project.cpp:5\n"
104,134 50^running
104,134 *running,thread-id="all"
104,134 (gdb) 
104,134
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000000004020c2",func="main()",file="../src/Test_Project.cpp",fullname="<PATH_TO_PROJECT>/test_project/Test_Project/src/Test_Project.cpp",line="13",times="2",original-location="<PATH_TO_PROJECT>/test_project/Test_Project/src/Test_Project.cpp:13"}
104,136 ~"\nBreakpoint "
104,136 ~"1, main () at ../src/Test_Project.cpp:13\n"
104,137 ~"13\t\tmy_func();\n"
104,137 (gdb)

-- 
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]