From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24447 invoked by alias); 18 Feb 2011 15:55:26 -0000 Received: (qmail 24436 invoked by uid 22791); 18 Feb 2011 15:55:25 -0000 X-SWARE-Spam-Status: No, hits=-1.9 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; Fri, 18 Feb 2011 15:55:21 +0000 Received: (qmail 30646 invoked from network); 18 Feb 2011 15:55:19 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Feb 2011 15:55:19 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] delete a range of display numbers Date: Fri, 18 Feb 2011 15:58:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.6.0; x86_64; ; ) Cc: Tom Tromey , Guillaume Leconte , Eli Zaretskii References: <201102181159.00201.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102181555.13149.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: 2011-02/txt/msg00469.txt.bz2 On Friday 18 February 2011 15:14:04, Tom Tromey wrote: > >>>>> "Pedro" == Pedro Alves writes: > > Pedro> The "delete" breakpoint command accepts ranges as > Pedro> well, and even has code that handles convenience > Pedro> variables mixed with the numbers. I think we should > Pedro> reuse that instead of re-adding code that parses ranges. > Pedro> Might as well make the "delete display" command > Pedro> implementation look more like the "delete" command > Pedro> implementation. Here's a quick cut at it. > > I've been thinking of starting a cli/cli-utils.c file and putting shared > CLI parsing code there. This seems like a good candidate, WDYT? Yeah. Sounds good. > I can do the moving. Thanks. > > Pedro> if (p == NULL) > Pedro> - /* Empty line means refer to the last breakpoint. */ > Pedro> - return breakpoint_count; > Pedro> + return 0; > > I was surprised that this didn't imply any other changes, but I looked > at a bunch of calls into this code and I couldn't see anything. Yeah, sorry I should have said I also looked and couldn't find where's that being used. It look like a dead path at this point. I'll do a testrun with a gdb_assert in place to be a bit more sure. -- Pedro Alves