/* Target-dependent code for Motorola 68000 BSD's.
- Copyright 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "defs.h"
#include "arch-utils.h"
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
tdep->jb_pc = 5;
tdep->jb_elt_size = 4;
+ set_gdbarch_decr_pc_after_break (gdbarch, 2);
+
set_gdbarch_regset_from_core_section
(gdbarch, m68kbsd_regset_from_core_section);
}