This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Verbose eflags on i386/x86-64
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Michal Ludvig <mludvig at suse dot cz>
- Cc: gdb <gdb at sources dot redhat dot com>
- Date: Tue, 26 Mar 2002 17:45:04 -0500
- Subject: Re: Verbose eflags on i386/x86-64
- References: <3CA0B45C.4050303@suse.cz>
> Hi,
> I'd like to modify "info registers" so that it would print current state of flags within eflags register on i386/x86-64.
> Now the output is:
> eflags 0x246 582
> and I would like to see something like:
> eflags 0x246 [DF SF AF PF]
>
> I don't know what is the correct approach. I'd vote for adding new builtin_whatever_type_for_x86_eflags, modify register_virtual_type function and add a new function for printing a function with this type.
>
> Can I do it this way, or is there a better solution?
The traditional (note that I'm not saying better :-) way of doing this
is to implement custom versions of the multi-arch functions
do_registers_info() and/or print_float_info().
As for changing eflags's type, do you need a print function or can the
type be changed in a way that, when printed using existing code, has the
effect you want?
I'd have a look at the i386 code.
Andrew