This is the mail archive of the
mailing list for the GDB project.
Re: ARM patch -- extra info about cpsr register
- To: rearnsha at arm dot com
- Subject: Re: ARM patch -- extra info about cpsr register
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Mon, 27 Mar 2000 14:14:08 -0500
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat , Inc. - Toronto
- References: <200003131918.TAA21085@cam-mail2.cambridge.arm.com>
Thanks for the submission. However, we are using something else to show register bits nowadays. It uses the
REGISTER_VIRTUAL_TYPE and we build a type for the register with bitfields so normal gdb processing (and the GUI) can
show the bits and allow the user to set a specific bit by name (without having to know its position by heart).
I am sorting out some details and tracking down a bug in gdb before making it available. My code is for another
processor but it will be very easy to adapt it for ARM. If you fell like helping, as soon as I have a final version I
can point you to the right pieces of code.
Hope you are not too disappointed.
Richard Earnshaw wrote:
> Time I sorted out some of my local changes...
> This patch provides a useful additional decoding of the CPSR register for
> ARM ports of GDB for commands such as "info reg". It translates the
> setting of the CPSR into a set of mnemonic letters representing the
> settings of the various flag bits as documented in the data sheet (upper
> case for set bits, lower case for clear bits) -- generally I find this
> much more intelligible than the raw numbers.
> <date> Richard Earnshaw (firstname.lastname@example.org)
> * arm-tdep.c (arm_print_register_hook): New function.
> * arm/tm-arm.h (PRINT_REGISTER_HOOK): Call it.
> (FLAG_*): New bits in CPSR.
Red Hat - Toronto E-Mail: email@example.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299