From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18566 invoked by alias); 28 Jan 2013 12:17:03 -0000 Received: (qmail 18516 invoked by uid 48); 28 Jan 2013 12:16:59 -0000 From: "velimir at synopsys dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/15072] New: [Reverse Debugging] if breakpoint present gdb does not send *stopped event when reverse-finish Date: Mon, 28 Jan 2013 12:17:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: velimir at synopsys dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00121.txt.bz2 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 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=" 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="/test_project/Test_Project/src/Test_Project.cpp",line="13",times="2",original-location="/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.