From: Stephane Carrez Date: Sun, 2 Mar 2003 10:23:09 +0000 (+0000) Subject: * arch-utils.c (generic_register_byte): Fix to use the loop index X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0aa7e1aa07c5fced19457c55240df2b3502dc55d;p=binutils-gdb.git * arch-utils.c (generic_register_byte): Fix to use the loop index and not regnum when summing the size of all registers up to regnum. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d82575c2605..09755387207 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-03-02 Stephane Carrez + + * arch-utils.c (generic_register_byte): Fix to use the loop index + and not regnum when summing the size of all registers up to regnum. + 2003-03-01 Andrew Cagney * gdbarch.sh (DEPRECATED_FRAME_INIT_SAVED_REGS): Rename diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index d1d49fd68d6..1016ba104a5 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -460,7 +460,7 @@ generic_register_byte (int regnum) byte = 0; for (i = 0; i < regnum; i++) { - byte += generic_register_size (regnum); + byte += generic_register_size (i); } return byte; }