Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [PATCH] make record_insn_max_num uinteger
Date: Thu, 15 Oct 2009 17:29:00 -0000	[thread overview]
Message-ID: <4AD75AAD.8040200@vmware.com> (raw)

[-- 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."), _("\

             reply	other threads:[~2009-10-15 17:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15 17:29 Michael Snyder [this message]
2009-10-16  1:27 ` Hui Zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD75AAD.8040200@vmware.com \
    --to=msnyder@vmware.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox