From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2556 invoked by alias); 6 Jun 2002 19:26:44 -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 2542 invoked from network); 6 Jun 2002 19:26:43 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 6 Jun 2002 19:26:43 -0000 Received: from localhost.redhat.com (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA05511; Thu, 6 Jun 2002 12:26:35 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id A2B6311077; Thu, 6 Jun 2002 15:25:56 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15615.46916.500499.992015@localhost.redhat.com> Date: Thu, 06 Jun 2002 12:26:00 -0000 To: Don Howard Cc: Subject: Re: Disable redefinition of built-in commands. In-Reply-To: References: X-SW-Source: 2002-06/txt/msg00099.txt.bz2 Don Howard writes: > > On Thu, 6 Jun 2002, Elena Zannoni wrote: > > > > > > > Don, > > you forgot the ChangeLog. > > > > Elena > > > > Woops - thanks, Elena. > > > > > The following patch disables redefinition of built-in commands. This > corrects two problems: > > Redefining a built-in command leaves the command's alias in an > inconsistent state. Invoking the alias of a redefined command can cause > gdb to crash. > > Once a built-in command has been redefined, there is no way to access that > command's original functionality. > Looks ok to me. But it's Fernando's call, no? Elena > > > 2002-06-06 Don Howard > > * cli/cli-script.c (define_command): Disable redefinition of > built-in commands. > > > > Index: cli/cli-script.c > =================================================================== > RCS file: /cvs/src/src/gdb/cli/cli-script.c,v > retrieving revision 1.12 > diff -p -u -w -r1.12 cli-script.c > --- cli/cli-script.c 12 Apr 2002 22:31:23 -0000 1.12 > +++ cli/cli-script.c 6 Jun 2002 18:05:08 -0000 > @@ -1070,9 +1070,7 @@ define_command (char *comname, int from_ > if (c->class == class_user || c->class == class_alias) > tem = "Redefine command \"%s\"? "; > else > - tem = "Really redefine built-in command \"%s\"? "; > - if (!query (tem, c->name)) > - error ("Command \"%s\" not redefined.", c->name); > + error ("Redefinition of built-in commands is not supported."); > } > > /* If this new command is a hook, then mark the command which it > > > -- > dhoward@redhat.com > gdb engineering > > > > >