From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1786 invoked by alias); 25 Mar 2013 15:58:06 -0000 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 Received: (qmail 1510 invoked by uid 89); 25 Mar 2013 15:57:59 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 25 Mar 2013 15:57:59 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2PFvv4F012747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Mar 2013 11:57:57 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2PFvuHD001227; Mon, 25 Mar 2013 11:57:56 -0400 Message-ID: <51507403.6030208@redhat.com> Date: Mon, 25 Mar 2013 17:23:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: GDB Patches , "Metzger, Markus T" Subject: "set record instruction-history" ? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-03/txt/msg00938.txt.bz2 Hi Markus, I'm going through all "uinteger" commands in the tree, and finding several cases of commands that actually shouldn't be "uinteger", but "zuinteger". "record instruction-history"'s implementation looks odd enough that I don't understand what's going on. The docs don't mention anything about 0 being special or meaning "unlimited", but I take it that's the intent? What's the intent of: /* The "record instruction-history" command. */ static void cmd_record_insn_history (char *arg, int from_tty) { int flags, size; require_record_target (); flags = get_insn_history_modifiers (&arg); /* We use a signed size to also indicate the direction. Make sure that unlimited remains unlimited. */ size = (int) record_insn_history_size; if (size < 0) size = INT_MAX; these last three lines here, though? One can't set this option to negative values: (gdb) set record instruction-history-size -2 integer -2 out of range The fact that it maps all negatives to INT_MAX is odd, and needing to set the option to high-enough unsigned 32-bit integers that trigger that bit of code looks quite non-user-friendly, even if it didn't always map to INT_MAX: (gdb) set record instruction-history-size 0xffffff00 (gdb) show record instruction-history-size Number of instructions to print in "record instruction-history" is 4294967040. (and exposes 32-bitness to the user, that I'd rather not) -- Pedro Alves