From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9093 invoked by alias); 6 Apr 2006 18:38:52 -0000 Received: (qmail 9084 invoked by uid 22791); 6 Apr 2006 18:38:51 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 06 Apr 2006 18:38:50 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id D171B48CDF8 for ; Thu, 6 Apr 2006 14:37:34 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06636-02-3 for ; Thu, 6 Apr 2006 14:37:34 -0400 (EDT) Received: from takamaka.act-europe.fr (s142-179-108-108.bc.hsia.telus.net [142.179.108.108]) by nile.gnat.com (Postfix) with ESMTP id 4036448CEBE for ; Thu, 6 Apr 2006 14:37:34 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id AC7E947E7F; Thu, 6 Apr 2006 11:37:33 -0700 (PDT) Date: Thu, 06 Apr 2006 18:38:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFA] Add "del" as alias to "delete" Message-ID: <20060406183733.GB800@adacore.com> References: <20060406162400.GK1055@adacore.com> <20060406163009.GA29559@nevyn.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <20060406163009.GA29559@nevyn.them.org> User-Agent: Mutt/1.4i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00076.txt.bz2 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1146 > > 2006-04-06 Joel Brobecker > > > > * breakpoint.c (_initialize_breakpoint): Add "del" as an alias > > of the "delete" command. > > > > Yes, thank you! Great. Thanks. This part has now been committed. > > Perhaps I should add a test too in one of the breakpoint testcases... > > Will work on that as soon as this one is in. > > Please. We know that people actually use "del", so let's take care > not to break it. Attached is a first attempt. I ended up writing a new testcase for it, so we can collect all aliases of "delete" in that testcase. Hope it was ok. This testcase causes 1 FAIL without the patch above. I have a question: How can we test that GDB didn't return any output from the command? "" seems to match anything... > Does anyone think we should make "dele" and "delet" work again too? I don't mind adding them, but I've never used these abbreviations. I suggest we wait for people to complain before adding them as aliases. 2006-04-06 Joel Brobecker * gdb.base/del.c: New file. * gdb.base/del.exp: New testcase. Comments? -- Joel --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="del.c" Content-length: 947 /* This testcase is part of GDB, the GNU debugger. Copyright 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Please email any bugs, comments, and/or additions to this file to: bug-gdb@prep.ai.mit.edu */ int main(void) { return 0; } --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="del.exp" Content-length: 1820 # Copyright 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # The intent of this testcase it to verify that various aliases and # shortcuts of the "delete" command never stop working. if $tracelevel then { strace $tracelevel } set prms_id 0 set bug_id 0 set testfile del set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested "Couldn't compile test program" return -1 } # Get things started. gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} # Test whether the "del" command works as an alias of "delete". # For that, insert a breakpoint at an easy location, remove it, # and then check in the output of "info break" that this breakpoint # no longer exists. gdb_test "break main" \ "Breakpoint.*at.* file .*$srcfile, line.*" \ "breakpoint function" gdb_test "del \$bpnum" \ "" \ "Remove last breakpoint" gdb_test "info break" \ "No breakpoints or watchpoints." \ "info break after removing break on main" --zYM0uCDKw75PZbzx--