From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11941 invoked by alias); 19 Oct 2008 14:21:57 -0000 Received: (qmail 11931 invoked by uid 22791); 19 Oct 2008 14:21:56 -0000 X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.187) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 19 Oct 2008 14:21:19 +0000 Received: by ti-out-0910.google.com with SMTP id d10so683109tib.12 for ; Sun, 19 Oct 2008 07:21:15 -0700 (PDT) Received: by 10.110.95.15 with SMTP id s15mr4196685tib.8.1224426075566; Sun, 19 Oct 2008 07:21:15 -0700 (PDT) Received: by 10.110.42.9 with HTTP; Sun, 19 Oct 2008 07:21:15 -0700 (PDT) Message-ID: Date: Sun, 19 Oct 2008 14:21:00 -0000 From: teawater To: "gdb-patches@sourceware.org" , "Michael Snyder" Subject: [RFA] Set stop_pc when TARGET_WAITKIND_NO_HISTORY MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_118489_19909812.1224426075565" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00466.txt.bz2 ------=_Part_118489_19909812.1224426075565 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 1202 Hi Michael, I try the 20080930 branch and got: (gdb) start Temporary breakpoint 1 at 0x80483c1: file 1.c, line 20. Starting program: /home/teawater/rec/a.out Temporary breakpoint 1, main () at 1.c:20 20 int b = 0; (gdb) record (gdb) n 21 int c = 1; (gdb) 24 printf ("a = %d b = %d c = %d\n", a, b, c); (gdb) a = 0 b = 0 c = 1 25 b = cool (); (gdb) rn No more reverse-execution history. main () at 1.c:20 20 int b = 0; (gdb) n Cannot find bounds of current function This is because: case TARGET_WAITKIND_NO_HISTORY: /* Reverse execution: target ran out of history info. */ print_stop_reason (NO_HISTORY, 0); stop_stepping (ecs); return; This place doesn't set stop_pc but in step_1: if (find_pc_partial_function (stop_pc, &name, &tp->step_range_start, &tp->step_range_end) == 0) error (_("Cannot find bounds of current function")); So I add code to set stop_pc. I think this bug will affect main tree too. So this patch is for both 20080930 branch and main tree. 2008-10-19 Hui Zhu * infrun.c (handle_inferior_event): Set "stop_pc" when TARGET_WAITKIND_NO_HISTORY. Thanks, Hui ------=_Part_118489_19909812.1224426075565 Content-Type: text/plain; name=set_stop_pc.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_fmhrn8ge0 Content-Disposition: attachment; filename=set_stop_pc.txt Content-length: 830 LS0tIGEvQ2hhbmdlTG9nCisrKyBiL0NoYW5nZUxvZwpAQCAtMSwzICsxLDgg QEAKKzIwMDgtMTAtMTkgIEh1aSBaaHUgIDx0ZWF3YXRlckBnbWFpbC5jb20+ CisKKwkqIGluZnJ1bi5jIChoYW5kbGVfaW5mZXJpb3JfZXZlbnQpOiBTZXQg InN0b3BfcGMiIHdoZW4KKwlUQVJHRVRfV0FJVEtJTkRfTk9fSElTVE9SWS4K KwogMjAwOC0xMC0xOCAgUGVkcm8gQWx2ZXMgIDxwZWRyb0Bjb2Rlc291cmNl cnkuY29tPgogCiAJKiBpbmZydW4uYyAoYWRqdXN0X3BjX2FmdGVyX2JyZWFr KTogRG8gbm90aGluZyBpZiBleGVjdXRpbmcgaW4KLS0tIGEvaW5mcnVuLmMK KysrIGIvaW5mcnVuLmMKQEAgLTIyMzcsNiArMjIzNyw3IEBAIGhhbmRsZV9p bmZlcmlvcl9ldmVudCAoc3RydWN0IGV4ZWN1dGlvbl8KIAogICAgIGNhc2Ug VEFSR0VUX1dBSVRLSU5EX05PX0hJU1RPUlk6CiAgICAgICAvKiBSZXZlcnNl IGV4ZWN1dGlvbjogdGFyZ2V0IHJhbiBvdXQgb2YgaGlzdG9yeSBpbmZvLiAg Ki8KKyAgICAgIHN0b3BfcGMgPSByZWFkX3BjICgpOwogICAgICAgcHJpbnRf c3RvcF9yZWFzb24gKE5PX0hJU1RPUlksIDApOwogICAgICAgc3RvcF9zdGVw cGluZyAoZWNzKTsKICAgICAgIHJldHVybjsK ------=_Part_118489_19909812.1224426075565--