aboutsummaryrefslogtreecommitdiff
path: root/gdb/trad-frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/trad-frame.c')
-rw-r--r--gdb/trad-frame.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c
index 5c8f213..6dfa0b6 100644
--- a/gdb/trad-frame.c
+++ b/gdb/trad-frame.c
@@ -53,7 +53,8 @@ trad_frame_alloc_saved_regs (struct frame_info *next_frame)
{
int regnum;
struct gdbarch *gdbarch = get_frame_arch (next_frame);
- int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ int numregs = gdbarch_num_regs (current_gdbarch)
+ + gdbarch_num_pseudo_regs (current_gdbarch);
struct trad_frame_saved_reg *this_saved_regs
= FRAME_OBSTACK_CALLOC (numregs, struct trad_frame_saved_reg);
for (regnum = 0; regnum < numregs; regnum++)