* 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.
This commit is contained in:
Stephane Carrez 2003-03-02 10:23:09 +00:00
parent 9b9f7b3ccd
commit 0aa7e1aa07
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-03-02 Stephane Carrez <stcarrez@nerim.fr>
* 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 <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_FRAME_INIT_SAVED_REGS): Rename

View File

@ -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;
}