Redefining built-in commands.

Tom Tromey
Mon Jun 10 09:23:00 GMT 2002

>>>>> "Don" == Don Howard <> 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.


More information about the Gdb mailing list