This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] printing/setting flag register fields
- From: Daniel Jacobowitz <drow at false dot org>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 20 Sep 2009 14:00:36 -0400
- Subject: Re: [RFC] printing/setting flag register fields
- References: <20090918235632.0DDC6843AC@ruffy.mtv.corp.google.com>
On Fri, Sep 18, 2009 at 04:56:32PM -0700, Doug Evans wrote:
> Hi.
>
> Before I go too far down this path, I'm looking for early feedback.
>
> What do folks think?
Just my two cents - flag types were a workaround for GDB's lack of
good pretty-printing facilities. They should be just structs
containing bitfields, with a default pretty-printer. And/or a union
with an accessible integer value. Anywhere that our handling of such
constructs isn't good enough for eflags, it's not good enough for user
code either, and I deal with a lot of code of this nature.
As for bitfield numbering, I think we should use the corresponding
architecture's conventions; I don't know what the m68k complication
is, though.
--
Daniel Jacobowitz
CodeSourcery