Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] make record_insn_max_num uinteger
@ 2009-10-15 17:29 Michael Snyder
  2009-10-16  1:27 ` Hui Zhu
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Snyder @ 2009-10-15 17:29 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

Treating this as obvious.  This variable can't be negative, so use
an unsigned.  And use uinteger set command instead of zinteger, so
that it will report itself as "unlimited" when set to zero.


[-- Attachment #2: uinteger.txt --]
[-- Type: text/plain, Size: 1305 bytes --]

2009-10-15  Michael Snyder  <msnyder@vmware.com>

	* record.c (record_insn_max_num): Make unsigned.
	(_initialize_record): Use uinteger instead of zinteger for
	set command, so that it will report "unlimited" for zero.

Index: record.c
===================================================================
RCS file: /cvs/src/src/gdb/record.c,v
retrieving revision 1.22
diff -u -p -r1.22 record.c
--- record.c	15 Oct 2009 17:15:56 -0000	1.22
+++ record.c	15 Oct 2009 17:26:08 -0000
@@ -98,7 +98,7 @@ static struct record_entry *record_arch_
 
 /* 1 ask user. 0 auto delete the last struct record_entry.  */
 static int record_stop_at_limit = 1;
-static int record_insn_max_num = DEFAULT_RECORD_INSN_MAX_NUM;
+static unsigned int record_insn_max_num = DEFAULT_RECORD_INSN_MAX_NUM;
 static int record_insn_num = 0;
 
 /* The target_ops of process record.  */
@@ -1438,7 +1438,7 @@ When OFF, if the record/replay buffer be
 delete the oldest recorded instruction to make room for each new one."),
 			   NULL, NULL,
 			   &set_record_cmdlist, &show_record_cmdlist);
-  add_setshow_zinteger_cmd ("insn-number-max", no_class,
+  add_setshow_uinteger_cmd ("insn-number-max", no_class,
 			    &record_insn_max_num,
 			    _("Set record/replay buffer limit."),
 			    _("Show record/replay buffer limit."), _("\

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-16  1:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-15 17:29 [PATCH] make record_insn_max_num uinteger Michael Snyder
2009-10-16  1:27 ` Hui Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox