[RFA] top.c (set_verbose): Assert showcmd was found.

Michael Snyder msnyder@vmware.com
Fri Mar 11 21:15:00 GMT 2011


Joel Brobecker wrote:
>> 2011-03-04  Michael Snyder  <msnyder@vmware.com>
>>
>> 	* top.c (set_verbose): Assert showcmd was found.
> 
> No objection.

Thanks - committing this change.

> 
>>    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.
> 

I'll submit that change in a moment.




More information about the Gdb-patches mailing list