Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Don Howard <dhoward@redhat.com>
To: <gdb-patches@sources.redhat.com>
Subject: Disable redefinition of built-in commands.
Date: Thu, 06 Jun 2002 12:02:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.33.0206061105370.3324-100000@theotherone> (raw)



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.




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





             reply	other threads:[~2002-06-06 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-06 12:02 Don Howard [this message]
2002-06-06 12:44 ` Joel Brobecker
2002-06-06 12:16 Don Howard
2002-06-06 12:26 ` Elena Zannoni
2002-06-07  6:16 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0206061105370.3324-100000@theotherone \
    --to=dhoward@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox