From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26206 invoked by alias); 15 Apr 2009 17:04:57 -0000 Received: (qmail 26130 invoked by uid 22791); 15 Apr 2009 17:04:56 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.188) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Apr 2009 17:04:51 +0000 Received: by ti-out-0910.google.com with SMTP id a1so2282278tib.12 for ; Wed, 15 Apr 2009 10:04:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.42.17 with SMTP id p17mr361488tip.51.1239815088824; Wed, 15 Apr 2009 10:04:48 -0700 (PDT) In-Reply-To: References: Date: Wed, 15 Apr 2009 17:04:00 -0000 Message-ID: Subject: Re: [RFA] Submit process record and replay fourth time, 5/8 From: Hui Zhu To: "gdb-patches@sourceware.org" Cc: Pedro Alves , Marc Khouzam , Michael Snyder , Thiago Jung Bauermann , Eli Zaretskii , paawan1982@yahoo.com, Mark Kettenis Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2009-04/txt/msg00325.txt.bz2 Add RECORD_IS_USED. --- infrun.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- a/infrun.c +++ b/infrun.c @@ -48,6 +48,7 @@ #include "gdb_assert.h" #include "mi/mi-common.h" #include "event-top.h" +#include "record.h" /* Prototypes for local functions */ @@ -603,7 +604,8 @@ use_displaced_stepping (struct gdbarch * return (((can_use_displaced_stepping == can_use_displaced_stepping_auto && non_stop) || can_use_displaced_stepping == can_use_displaced_stepping_on) - && gdbarch_displaced_step_copy_insn_p (gdbarch)); + && gdbarch_displaced_step_copy_insn_p (gdbarch) + && !RECORD_IS_USED); } /* Clean out any stray displaced stepping state. */ @@ -2130,6 +2132,10 @@ adjust_pc_after_break (struct execution_ if (software_breakpoint_inserted_here_p (breakpoint_pc) || (non_stop && moribund_breakpoint_here_p (breakpoint_pc))) { + struct cleanup *old_cleanups = NULL; + if (RECORD_IS_USED) + old_cleanups = record_gdb_operation_disable_set (); + /* When using hardware single-step, a SIGTRAP is reported for both a completed single-step and a software breakpoint. Need to differentiate between the two, as the latter needs adjusting @@ -2153,6 +2159,9 @@ adjust_pc_after_break (struct execution_ || !currently_stepping (ecs->event_thread) || ecs->event_thread->prev_pc == breakpoint_pc) regcache_write_pc (regcache, breakpoint_pc); + + if (old_cleanups) + do_cleanups (old_cleanups); } }