gdb: Avoid signed integer overflow when printing source lines
[deliverable/binutils-gdb.git] / gdb / trad-frame.c
index a3484d2b3991fb3f6b8c441b0bf4ce1c4acf5364..3cb295309c5609d316dca35a49bbbadd43bc07a5 100644 (file)
@@ -1,6 +1,6 @@
 /* Traditional frame unwind support, for GDB the GNU Debugger.
 
-   Copyright (C) 2003-2018 Free Software Foundation, Inc.
+   Copyright (C) 2003-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,7 +48,7 @@ struct trad_frame_saved_reg *
 trad_frame_alloc_saved_regs (struct gdbarch *gdbarch)
 {
   int regnum;
-  int numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
+  int numregs = gdbarch_num_cooked_regs (gdbarch);
   struct trad_frame_saved_reg *this_saved_regs
     = FRAME_OBSTACK_CALLOC (numregs, struct trad_frame_saved_reg);
 
This page took 0.023518 seconds and 4 git commands to generate.