aboutsummaryrefslogtreecommitdiff
path: root/gdb/m68kbsd-tdep.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2007-06-15 20:19:17 +0000
committerVladimir Prus <vladimir@codesourcery.com>2007-06-15 20:19:17 +0000
commit8ed86d01ca8b14c14f37429df136130158066f8a (patch)
treea3231e56da4ff518ccdf29560df00bcc783ede04 /gdb/m68kbsd-tdep.c
parent83cc5c53e52677b0b951844c49ef1b2c94999809 (diff)
downloadgdb-8ed86d01ca8b14c14f37429df136130158066f8a.zip
gdb-8ed86d01ca8b14c14f37429df136130158066f8a.tar.gz
gdb-8ed86d01ca8b14c14f37429df136130158066f8a.tar.bz2
* m68k-tdep.h (enum m68k_flavour): New.
(struct gdbarch_tdep): New fields float_return, flavour and fpregs_present. * m68k-tdep.c (m68k_register_type): Use fpregs_present and conditionalize floating registers type on flavour. (m68k_register_names): New. (m68k_register_name): Use the above. (m68k_convert_register_p): Consult fpregs_present. (m68k_register_to_value, m68k_value_to_register): Use register_type to obtain the type of floating point registers. (m68k_svr4_extract_return_value): Check tdep->float_return. Use register_type to get the type of floating point regiters. (m68k_svr4_store_return_value): Likewise. (m68k_dwarf_reg_to_regnum): Check tdep->fpregs_present. (m68k_analyze_register_saves): Likewise. (m68k_gdbarch_init): Extract infromation from XML description, if present. Guess coldfire by looking at the file, if present. Conditionalize setting of long double format. Set decr_pc_after_break to 2 on coldfire and fido. Enable XML-driven register description. * m68kbsd-tdep.c (m68kbsd_fpreg_offset): Use size of tdep->fpreg_type, as opposed to hardcoded value. * Makefile.in (m68k-tdep.o): Update dependencies.
Diffstat (limited to 'gdb/m68kbsd-tdep.c')
-rw-r--r--gdb/m68kbsd-tdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c
index 01208e5..383a303 100644
--- a/gdb/m68kbsd-tdep.c
+++ b/gdb/m68kbsd-tdep.c
@@ -45,10 +45,12 @@
int
m68kbsd_fpreg_offset (int regnum)
{
+ int fp_len = TYPE_LENGTH (gdbarch_register_type (current_gdbarch, regnum));
+
if (regnum >= M68K_FPC_REGNUM)
- return 8 * 12 + (regnum - M68K_FPC_REGNUM) * 4;
+ return 8 * fp_len + (regnum - M68K_FPC_REGNUM) * 4;
- return (regnum - M68K_FP0_REGNUM) * 12;
+ return (regnum - M68K_FP0_REGNUM) * fp_len;
}
/* Supply register REGNUM from the buffer specified by FPREGS and LEN