From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8761 invoked by alias); 23 Aug 2002 17:50:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8754 invoked from network); 23 Aug 2002 17:50:26 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 23 Aug 2002 17:50:26 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g7NHZll15885 for ; Fri, 23 Aug 2002 13:35:48 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g7NHoNu24711 for ; Fri, 23 Aug 2002 13:50:24 -0400 Received: from theotherone.redhat-remotie.org (IDENT:PtkG9tDMxgfZpbJtLhoBMAC99xyjVDdm@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g7NHoLe16915; Fri, 23 Aug 2002 10:50:21 -0700 Received: from localhost (localhost.fidalgo.net [127.0.0.1]) by theotherone.redhat-remotie.org (Postfix) with ESMTP id AA6F8BB7F8; Fri, 23 Aug 2002 10:48:01 -0700 (PDT) Date: Fri, 23 Aug 2002 11:12:00 -0000 From: Don Howard X-X-Sender: To: Michael Snyder Cc: Joel Brobecker , Subject: Re: [RFA] GDB/622 - clear current breakpoint in commands causes trouble In-Reply-To: <3D655F34.CAA997E5@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-08/txt/msg00757.txt.bz2 On Thu, 22 Aug 2002, Michael Snyder wrote: > Joel Brobecker wrote: > > > > ping? > > > > > 2002-07-31 Joel Brobecker > > > > > > * cli/cli-scripts.c (copy_command_lines): New function. > > > (make_cleanup_free_command_lines): Make this function non static. > > > > > > * defs.h (copy_command_lines): Add definition. > > > (make_cleanup_free_command_lines): Add definition. > > > > > > * breakpoint.c (bpstat_do_actions): Execute a temporary copy of > > > the command-list associated to each breakpoint hit, in order to > > > avoid accessing a dangling pointer, in case one of the commands > > > in the list causes the breakpoint to be deleted. > > Joel, > > It looks OK to me, but I'd like to run it by Don Howard, > who has looked at this before. Don, this patch looks a lot > simpler than the one you submitted (which, I think, died on > the vine (mea culpa)). Do you think it will do the job? > > Michael > Yes this patch looks very much like one of my earlier attempts. Joel's copy_command_lines() is simpler and catches a few bugs that I noticed in my implementation. One question: is it important to use xstrdup() over plain strdup()? You already pointed out the cleanup issues. Once that is corrected, I'd recomend it. -- dhoward@redhat.com gdb engineering