From: Daniel Jacobowitz <drow@false.org>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] printing/setting flag register fields
Date: Sun, 20 Sep 2009 20:27:00 -0000 [thread overview]
Message-ID: <20090920202656.GA2321@caradoc.them.org> (raw)
In-Reply-To: <e394668d0909201135u8a28d42t995db6256d75f277@mail.gmail.com>
On Sun, Sep 20, 2009 at 11:35:31AM -0700, Doug Evans wrote:
> Should TYPE_CODE_FLAGS be nuked? I'm happy to do that instead if
> that's what folks want. I like it, but if we made eflags a union of a
> struct and an int, then "set $eflags.ZF = 0" won't work. Are folks
> happy with "set $eflags.bits.ZF = 0"? "works for me".
IMO what we really want is the struct - but with a way to say "print
the whole word-sized struct as a single integer". This is something I
need often. I'd like to see "$eflags is 0x12f, which is the A B and C
bits", without GDB syntax getting in my way.
Yes, that's vague :-)
> But it could be done differently. An off-the-cuff example is an
> option to ptype to print field offsets for structs in general. [I'm
> assuming such a facility doesn't already exist.] That would probably
> be more useful than always printing the offsets anyway.
I think such an option was submitted, once upon a time. I don't know
what became of it. I agree this would be more useful.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2009-09-20 20:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 23:57 Doug Evans
2009-09-19 7:07 ` Mark Kettenis
2009-09-19 7:38 ` Andreas Schwab
2009-09-20 18:00 ` Daniel Jacobowitz
2009-09-20 18:35 ` Doug Evans
2009-09-20 20:27 ` Daniel Jacobowitz [this message]
2009-09-21 16:43 ` Tom Tromey
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=20090920202656.GA2321@caradoc.them.org \
--to=drow@false.org \
--cc=dje@google.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