From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30338 invoked by alias); 1 Sep 2010 17:11:20 -0000 Received: (qmail 30327 invoked by uid 22791); 1 Sep 2010 17:11:19 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Sep 2010 17:11:14 +0000 Received: (qmail 28857 invoked from network); 1 Sep 2010 17:11:12 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Sep 2010 17:11:12 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [PATCH,ARM] Fix single step on vfork Date: Wed, 01 Sep 2010 17:11:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: Yao Qi References: <4C7E85C0.3050902@codesourcery.com> In-Reply-To: <4C7E85C0.3050902@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201009011811.10735.pedro@codesourcery.com> 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: 2010-09/txt/msg00026.txt.bz2 On Wednesday 01 September 2010 17:56:32, Yao Qi wrote: > > + /* Don't consider single-stepping when the inferior is > + waiting_for_vfork_done, either software or hardware step. In > + software step, child process will hit the software single step > + breakpoint inserted in parent process. In hardware step, GDB > + can resumes inferior, and waiting for vfork_done event. */ This last sentence looks incomplete? At least, I can't seem to parse it. > + if (current_inferior()->waiting_for_vfork_done) Space before parens. > + { > + if (debug_infrun) > + fprintf_unfiltered (gdb_stdlog, > + "infrun: resume : clear step\n"); > + step = 0; > + } > + > if (debug_infrun) > fprintf_unfiltered (gdb_stdlog, > "infrun: resume (step=%d, signal=%d), " > @@ -1577,11 +1590,16 @@ a command like `return' or `jump' to continue execution.")); > We can't use displaced stepping when we have a signal to deliver; > the comments for displaced_step_prepare explain why. The > comments in the handle_inferior event for dealing with 'random > - signals' explain what we do instead. */ > + signals' explain what we do instead. > + > + We can't use displaced stepping when we are waiting for vfork_done > + event, displaced stepping breaks the vfork child similarly as single > + step software breakpoint. */ > if (use_displaced_stepping (gdbarch) > && (tp->trap_expected > || (step && gdbarch_software_single_step_p (gdbarch))) > - && sig == TARGET_SIGNAL_0) > + && sig == TARGET_SIGNAL_0 > + && !current_inferior()->waiting_for_vfork_done) Space before parens. Otherwise okay. Thanks! -- Pedro Alves