From: Pedro Alves <palves@redhat.com>
To: GDB Patches <gdb-patches@sourceware.org>,
"Metzger, Markus T" <markus.t.metzger@intel.com>
Subject: "set record instruction-history" ?
Date: Mon, 25 Mar 2013 17:23:00 -0000 [thread overview]
Message-ID: <51507403.6030208@redhat.com> (raw)
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
next reply other threads:[~2013-03-25 15:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-25 17:23 Pedro Alves [this message]
2013-03-25 17:25 ` Metzger, Markus T
2013-03-25 19:55 ` Pedro Alves
2013-03-26 16:21 ` Metzger, Markus T
2013-03-26 16:53 ` Pedro Alves
2013-03-26 16:58 ` Metzger, Markus T
2013-03-26 19:35 ` Pedro Alves
2013-03-27 10:03 ` Metzger, Markus T
2013-03-27 11:23 ` Pedro Alves
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=51507403.6030208@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@intel.com \
/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