This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch:arm] Don't use NUM_PSEUDO_REGS in arm_gdbarch_init()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 24 Apr 2002 14:23:39 -0400
- Subject: Re: [patch:arm] Don't use NUM_PSEUDO_REGS in arm_gdbarch_init()
- References: <200204221107.MAA06332@cam-mail2.cambridge.arm.com>
> Argh! As you will see from the comment, I'd already fixed a similar
> problem to avoid using SIZEOF_FRAME_SAVED_REGS, but missed that part. Can
> you update the comment as well?
>
> /* We can't use SIZEOF_FRAME_SAVED_REGS here, since that still
> references the old architecture vector, not the one we are
> building here. */
>
(and NUM_REGS). I committed the attached.
Andrew
Wed Apr 24 14:22:21 2002 Andrew Cagney <cagney@redhat.com>
* arm-tdep.c (arm_gdbarch_init): Add comment that NUM_REGS nor
NUM_PSEUDO_REGS can be used.
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.52
diff -c -r1.52 arm-tdep.c
*** arm-tdep.c 23 Apr 2002 18:10:06 -0000 1.52
--- arm-tdep.c 24 Apr 2002 18:21:17 -0000
***************
*** 3035,3040 ****
--- 3035,3043 ----
if (prologue_cache.saved_regs != NULL)
xfree (prologue_cache.saved_regs);
+ /* We can't use NUM_REGS nor NUM_PSEUDO_REGS here, since that still
+ references the old architecture vector, not the one we are
+ building here. */
prologue_cache.saved_regs = (CORE_ADDR *)
xcalloc (1, (sizeof (CORE_ADDR)
* (gdbarch_num_regs (gdbarch)