This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Redefining built-in commands.
- From: Tom Tromey <tromey at redhat dot com>
- To: Don Howard <dhoward at redhat dot com>
- Cc: Eli Zaretskii <eliz at is dot elta dot co dot il>, <gdb at sources dot redhat dot com>
- Date: 10 Jun 2002 10:36:31 -0600
- Subject: Re: Redefining built-in commands.
- References: <Pine.LNX.4.33.0206051412080.3324-100000@theotherone>
- Reply-to: tromey at redhat dot com
>>>>> "Don" == Don Howard <dhoward@redhat.com> writes:
Don> (gdb) define step
Don> do something special
Don> step
Don> end
Don> (gdb)
Don> The above example ends up "doing something special" until gdb hits it's
Don> recursion limit, rather than doing something special and then stepping.
Don> The example *does* work just fine if the user picks anything other than a
Don> built-in name:
Bash solves this problem by adding a `command' command, which invokes
the original command. So in the above you could use `command step' to
invoke the real step. Perhaps this would be useful in gdb.
Tom