* irix5-nat.c (fill_gregset): Sign extend registers before

filling in the gregset structure.
This commit is contained in:
Peter Schauer 1996-12-21 10:10:43 +00:00
parent b5baebe405
commit bb4569b9f6
2 changed files with 19 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Sat Dec 21 02:08:14 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* irix5-nat.c (fill_gregset): Sign extend registers before
filling in the gregset structure.
Fri Dec 20 11:06:03 1996 Stu Grossman (grossman@critters.cygnus.com)
* mswin/genmakes: Don't define _DEBUG. This breaks wingdb.

View file

@ -75,31 +75,35 @@ fill_gregset (gregsetp, regno)
int regi;
register greg_t *regp = &(*gregsetp)[0];
/* Under Irix6, if GDB is built with N32 ABI and is debugging an O32
executable, we have to sign extend the registers to 64 bits before
filling in the gregset structure. */
for (regi = 0; regi <= CTX_RA; regi++)
if ((regno == -1) || (regno == regi))
*(regp + regi) =
extract_address (&registers[REGISTER_BYTE (regi)],
REGISTER_RAW_SIZE (regi));
extract_signed_integer (&registers[REGISTER_BYTE (regi)],
REGISTER_RAW_SIZE (regi));
if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CTX_EPC) =
extract_address (&registers[REGISTER_BYTE (PC_REGNUM)],
REGISTER_RAW_SIZE (PC_REGNUM));
extract_signed_integer (&registers[REGISTER_BYTE (PC_REGNUM)],
REGISTER_RAW_SIZE (PC_REGNUM));
if ((regno == -1) || (regno == CAUSE_REGNUM))
*(regp + CTX_CAUSE) =
extract_address (&registers[REGISTER_BYTE (CAUSE_REGNUM)],
REGISTER_RAW_SIZE (CAUSE_REGNUM));
extract_signed_integer (&registers[REGISTER_BYTE (CAUSE_REGNUM)],
REGISTER_RAW_SIZE (CAUSE_REGNUM));
if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CTX_MDHI) =
extract_address (&registers[REGISTER_BYTE (HI_REGNUM)],
REGISTER_RAW_SIZE (HI_REGNUM));
extract_signed_integer (&registers[REGISTER_BYTE (HI_REGNUM)],
REGISTER_RAW_SIZE (HI_REGNUM));
if ((regno == -1) || (regno == LO_REGNUM))
*(regp + CTX_MDLO) =
extract_address (&registers[REGISTER_BYTE (LO_REGNUM)],
REGISTER_RAW_SIZE (LO_REGNUM));
extract_signed_integer (&registers[REGISTER_BYTE (LO_REGNUM)],
REGISTER_RAW_SIZE (LO_REGNUM));
}
/*