This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/5]: Enhancements to "flags" type in xml register specs
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Cc: cole945 at gmail dot com
- Date: Mon, 29 Feb 2016 22:44:44 +0000
- Subject: [PATCH 0/5]: Enhancements to "flags" type in xml register specs
- Authentication-results: sourceware.org; auth=none
Hi.
The current support for "flags" registers in xml specs is limited
to single bit fields. It's not uncommon to have multibit bitfields
in flags registers. Plus, it's useful to be able to support enums here.
This patch set adds support for multibit bitfields, and adds enum support
using this patch as a start:
https://sourceware.org/ml/gdb-patches/2013-12/msg00864.html
Basically, there's no real internal difference to structs and flags.
So this patch unifies their support.
The difference is how the values are printed and used.
flags: can be used as integers, prints nicer than structs in the output
of "info registers"
struct: it's a struct
This also extends ptype to handle flags registers.
1/5: prep work: Use local variable "type" consistency.
2/5: prep work: Use LONGEST instead of int
3/5: the main patch
4/5: i386 cleanup (remove unnecessary "end" value in eflags specs)
5/5: add cpsr_flags to aarch64.xml
Regression tested on amd64-linux,
and also tested by regenerating all features/*.c files.