This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] top.c (set_verbose): Assert showcmd was found.
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 04 Mar 2011 15:58:48 -0800
- Subject: [RFA] top.c (set_verbose): Assert showcmd was found.
OK?
2011-03-04 Michael Snyder <msnyder@vmware.com>
* top.c (set_verbose): Assert showcmd was found.
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.193
diff -u -p -r1.193 top.c
--- top.c 31 Jan 2011 16:52:34 -0000 1.193
+++ top.c 4 Mar 2011 23:56:07 -0000
@@ -1425,6 +1425,8 @@ set_verbose (char *args, int from_tty, s
struct cmd_list_element *showcmd;
showcmd = lookup_cmd_1 (&cmdname, showlist, NULL, 1);
+ gdb_assert (showcmd != NULL
+ && showcmd != (struct cmd_list_element *) -1);
if (info_verbose)
{