This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: S/390: quite a bit of oboe playing going on in there
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 19 Dec 2001 18:10:13 -0500 (EST)
- Subject: PATCH: S/390: quite a bit of oboe playing going on in there
2001-12-19 Jim Blandy <jimb@redhat.com>
* s390-tdep.c (s390_register_name): S390_LAST_REGNUM is, in fact,
the last register number, not one greater than the last register
number.
* s390-tdep.c (s390_register_virtual_type): Replace clever but
incorrect range comparison with correct, legible equivalent.
Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.31
diff -c -r2.31 s390-tdep.c
*** gdb/s390-tdep.c 2001/12/19 22:33:10 2.31
--- gdb/s390-tdep.c 2001/12/19 23:00:00
***************
*** 161,169 ****
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15"
};
! if (reg_nr >= S390_LAST_REGNUM)
return NULL;
- return register_names[reg_nr];
}
--- 161,170 ----
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15"
};
! if (reg_nr <= S390_LAST_REGNUM)
! return register_names[reg_nr];
! else
return NULL;
}
***************
*** 1672,1679 ****
struct type *
s390_register_virtual_type (int regno)
{
! return ((unsigned) regno - S390_FPC_REGNUM) <
! S390_NUM_FPRS ? builtin_type_double : builtin_type_int;
}
--- 1673,1682 ----
struct type *
s390_register_virtual_type (int regno)
{
! if (S390_FP0_REGNUM <= regno && regno < S390_FP0_REGNUM + S390_NUM_FPRS)
! return builtin_type_double;
! else
! return builtin_type_int;
}