aboutsummaryrefslogtreecommitdiff
path: root/gdb/m68k-tdep.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2002-11-22 00:02:03 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2002-11-22 00:02:03 +0000
commitd85fe7f7fa4862015a50e89ec9b845e8155c2b0a (patch)
tree436422871900964b3444da4c1826c938ea1cccc5 /gdb/m68k-tdep.c
parenta3ced1cbd674d496110ea5f3141962598ffaa9c9 (diff)
downloadfsf-binutils-gdb-d85fe7f7fa4862015a50e89ec9b845e8155c2b0a.zip
fsf-binutils-gdb-d85fe7f7fa4862015a50e89ec9b845e8155c2b0a.tar.gz
fsf-binutils-gdb-d85fe7f7fa4862015a50e89ec9b845e8155c2b0a.tar.bz2
* m68k-tdep.c (m68k_register_virtual_type): Return int for SR, FPC
and FPS registers.
Diffstat (limited to 'gdb/m68k-tdep.c')
-rw-r--r--gdb/m68k-tdep.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 250f681..7039e64 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -148,20 +148,25 @@ m68k_register_virtual_size (int regnum)
return (((unsigned) (regnum) - FP0_REGNUM) < 8 ? 12 : 4);
}
-/* Return the GDB type object for the "standard" data type of data
- in register N. This should be int for D0-D7, long double for FP0-FP7,
- and void pointer for all others (A0-A7, PC, SR, FPCONTROL etc).
- Note, for registers which contain addresses return pointer to void,
- not pointer to char, because we don't want to attempt to print
- the string after printing the address. */
+/* Return the GDB type object for the "standard" data type of data in
+ register N. This should be int for D0-D7, SR, FPCONTROL and
+ FPSTATUS, long double for FP0-FP7, and void pointer for all others
+ (A0-A7, PC, FPIADDR). Note, for registers which contain
+ addresses return pointer to void, not pointer to char, because we
+ don't want to attempt to print the string after printing the
+ address. */
static struct type *
m68k_register_virtual_type (int regnum)
{
- if ((unsigned) regnum >= E_FPC_REGNUM)
+ if (regnum == E_FPI_REGNUM)
return lookup_pointer_type (builtin_type_void);
+ else if ((unsigned) regnum >= E_FPC_REGNUM)
+ return builtin_type_int;
else if ((unsigned) regnum >= FP0_REGNUM)
return builtin_type_long_double;
+ else if (regnum == PS_REGNUM)
+ return builtin_type_int;
else if ((unsigned) regnum >= A0_REGNUM)
return lookup_pointer_type (builtin_type_void);
else