Re: Redefining built-in commands.

Don Howard
2002-05-31T00:37:45Z

On Thu, 30 May 2002, Don Howard wrote:

>
>
> I've run across a bug involving redefinition of built-in commands:
>
> If the command has an alias, the alias is not redefined. Instead, the
> alias is left in an inconsistent state and causes a crash when invoked.
>
> Should gdb allow users to redefine built-in commands? If so, should the
> orignial alias continue to behave like the original built-in, or should
> it's behavior be modified also?
>

An example:

(gdb) define next
Really redefine built-in command "next"? (y or n) y
Type commands for definition of "next".
End with a line saying just "end".
>echo A silly example - redefine next\n
>end
(gdb) next
A silly example - redefine next
(gdb) n
Segmentation fault