[RFA] top.c (set_verbose): Assert showcmd was found.
Joel Brobecker
brobecker@adacore.com
Mon Mar 7 10:43:00 GMT 2011
> 2011-03-04 Michael Snyder <msnyder@vmware.com>
>
> * top.c (set_verbose): Assert showcmd was found.
No objection.
> showcmd = lookup_cmd_1 (&cmdname, showlist, NULL, 1);
> + gdb_assert (showcmd != NULL
> + && showcmd != (struct cmd_list_element *) -1);
I wonder if we shouldn't be defining a constant for this, such as
AMBIGUOUS_COMMAND_NAME, or somesuch. It would allow us to avoid
the ugly cast everytime we check the return value from this routine.
--
Joel
More information about the Gdb-patches
mailing list