From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26011 invoked by alias); 15 Oct 2009 17:29:28 -0000 Received: (qmail 26002 invoked by uid 22791); 15 Oct 2009 17:29:27 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Oct 2009 17:29:21 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 46DB243 for ; Thu, 15 Oct 2009 10:29:20 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost4.vmware.com (Postfix) with ESMTP id 3E360C9A96 for ; Thu, 15 Oct 2009 10:29:20 -0700 (PDT) Message-ID: <4AD75AAD.8040200@vmware.com> Date: Thu, 15 Oct 2009 17:29:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [PATCH] make record_insn_max_num uinteger Content-Type: multipart/mixed; boundary="------------020706090306030007020300" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00346.txt.bz2 This is a multi-part message in MIME format. --------------020706090306030007020300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 195 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. --------------020706090306030007020300 Content-Type: text/plain; name="uinteger.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="uinteger.txt" Content-length: 1305 2009-10-15 Michael Snyder * 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."), _("\ --------------020706090306030007020300--