This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Disable redefinition of built-in commands.


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  <dhoward@redhat.com>
 > 
 > 	* 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
 > 
 > 
 > 
 > 
 > 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]