This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)
     {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]