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]

[PATCH 03/10] maint watchdog.


gdb:

2012-07-30  Yao Qi  <yao@codesourcery.com>

	* defs.h: Update declaration of 'watchdog'.
	* maint.c (watchdog): Add 'unsigned'.
	(_initialize_maint_cmds): Call add_setshow_zuinteger_cmd instead
	of add_setshow_zinteger_cmd.
---
 gdb/defs.h  |    2 +-
 gdb/maint.c |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gdb/defs.h b/gdb/defs.h
index 7be99a2..552fcb5 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -690,7 +690,7 @@ extern void store_typed_address (gdb_byte *buf, struct type *type,
 
 /* From valops.c */
 
-extern int watchdog;
+extern unsigned int watchdog;
 
 /* Hooks for alternate command interfaces.  */
 
diff --git a/gdb/maint.c b/gdb/maint.c
index 6a106fd..06ca2f8 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -66,7 +66,7 @@ static void maintenance_do_deprecate (char *, int);
    GDB test suite, and makes it possible to distinguish between a hung target
    and one with slow communications.  */
 
-int watchdog = 0;
+unsigned int watchdog = 0;
 static void
 show_watchdog (struct ui_file *file, int from_tty,
 	       struct cmd_list_element *c, const char *value)
@@ -888,15 +888,15 @@ testsuite can check the command deprecator. You probably shouldn't use this,\n\
 If you decide you want to use it: maintenance undeprecate 'commandname'"),
 	   &maintenancelist);
 
-  add_setshow_zinteger_cmd ("watchdog", class_maintenance, &watchdog, _("\
+  add_setshow_zuinteger_cmd ("watchdog", class_maintenance, &watchdog, _("\
 Set watchdog timer."), _("\
 Show watchdog timer."), _("\
 When non-zero, this timeout is used instead of waiting forever for a target\n\
 to finish a low-level step or continue operation.  If the specified amount\n\
 of time passes without a response from the target, an error occurs."),
-			    NULL,
-			    show_watchdog,
-			    &setlist, &showlist);
+			     NULL,
+			     show_watchdog,
+			     &setlist, &showlist);
 
   add_setshow_boolean_cmd ("profile", class_maintenance,
 			   &maintenance_profile_p, _("\
-- 
1.7.7.6


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