This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ARM patch -- extra info about cpsr register

Hi Richard,

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.

Best regards,

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 (
>         * arm-tdep.c (arm_print_register_hook): New function.
>         * arm/tm-arm.h (PRINT_REGISTER_HOOK): Call it.
>         (FLAG_*): New bits in CPSR.

Fernando Nasser
Red Hat - Toronto                       E-Mail:
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]