From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21854 invoked by alias); 10 Oct 2008 13:12:57 -0000 Received: (qmail 21752 invoked by uid 22791); 10 Oct 2008 13:12:47 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Oct 2008 13:12:07 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 9BDDF10D32; Fri, 10 Oct 2008 13:12:05 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 70D7610D2F; Fri, 10 Oct 2008 13:12:05 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KoHmm-0002Tr-UD; Fri, 10 Oct 2008 09:12:04 -0400 Date: Fri, 10 Oct 2008 13:12:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: S?rgio Durigan J?nior , gdb-patches@sourceware.org Subject: Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part Message-ID: <20081010131204.GB9073@caradoc.them.org> Mail-Followup-To: Joel Brobecker , S?rgio Durigan J?nior , gdb-patches@sourceware.org References: <1222798409.30389.23.camel@miki> <20081002211256.GO3665@adacore.com> <1223001252.9858.11.camel@miki> <20081003060629.GQ3665@adacore.com> <1223161515.5956.25.camel@miki> <20081006172136.GA3588@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081006172136.GA3588@adacore.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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/msg00320.txt.bz2 On Mon, Oct 06, 2008 at 01:21:36PM -0400, Joel Brobecker wrote: > 2008-10-06 Joel Brobecker > > * breakpoint.h (enum bptype): New enum bp_catchpoint. > Delete bp_catch_fork and bp_catch_vfork. > * breakpoint.c: Implement the catch fork/vfork feature > using the bp_catchpoint bptype enum and the breakpoint_ops > structure. Remove the use of bp_catch_fork and bp_catch_vfork > breakpoint kinds. I think this is sufficiently non-mechanical that we should be more descriptive in the changelog. > @@ -1505,6 +1498,14 @@ update_breakpoints_after_exec (void) > continue; > } > > + if (b->type == bp_catchpoint) > + { > + /* For now, none of the bp_catchpoint breakpoints need to > + do anything at this point. In the future, if some of > + the catchpoints need to something, we will need to add > + a new method, and call this method from here. */ > + } > + > /* Don't delete an exec catchpoint, because else the inferior > won't stop when it ought! > > @@ -1513,9 +1514,7 @@ update_breakpoints_after_exec (void) > seen, but only when the subsequent exec is seen. (And because > deleting fork catchpoints here but not vfork catchpoints will > seem mysterious to users, keep those too.) */ > - if ((b->type == bp_catch_exec) || > - (b->type == bp_catch_vfork) || > - (b->type == bp_catch_fork)) > + if (b->type == bp_catch_exec) > { > continue; > } This bit changes behavior (and the old comment doesn't make sense any more). > - case bp_catch_fork: > - case bp_catch_vfork: > + case bp_catchpoint: Spaces/tabs? > @@ -3939,10 +3900,9 @@ user_settable_breakpoint (const struct b > user_settable_breakpoint (const struct breakpoint *b) > { > return (b->type == bp_breakpoint > + || b->type == bp_catchpoint > || b->type == bp_catch_load > || b->type == bp_catch_unload > - || b->type == bp_catch_fork > - || b->type == bp_catch_vfork Spaces/tabs again. > @@ -4163,9 +4123,8 @@ breakpoint_address_is_meaningful (struct > && type != bp_hardware_watchpoint > && type != bp_read_watchpoint > && type != bp_access_watchpoint > - && type != bp_catch_exec > - && type != bp_catch_fork > - && type != bp_catch_vfork); > + && type != bp_catchpoint > + && type != bp_catch_exec); > } > > /* Rescan breakpoints at the same address and section as BPT, Likewise. Anyway, that was all trivial. It looks good to me. -- Daniel Jacobowitz CodeSourcery