diff options
author | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-02-15 16:12:24 +0000 |
---|---|---|
committer | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-02-15 16:12:24 +0000 |
commit | 66e810cd098c57a4483f33cedc272486506eb485 (patch) | |
tree | 4f63c94878bbbe7303466f05708c5915015e2c33 /gdb/armnbsd-tdep.c | |
parent | 97e03143bb83533b4cf4fcd9d283b05722b4c128 (diff) | |
download | gdb-66e810cd098c57a4483f33cedc272486506eb485.zip gdb-66e810cd098c57a4483f33cedc272486506eb485.tar.gz gdb-66e810cd098c57a4483f33cedc272486506eb485.tar.bz2 |
* arm-tdep.h (struct gdbarch_tdep): Add fields for breakpoint
descriptions.
* arm-tdep.c (arm_default_arm_le_breakpoint)
(arm_default_arm_be_breakpoint, arm_default_thumb_le_breakpoint)
(arm_default_thumb_be_breakpoint): New. Initialize them from
traditional breakpoint defines.
(arm_breakpoint_from_pc): Use new gdbarch_tdep entries.
(arm_gdbarch_init): Initialize new breakpoint variables.
* arm-linux-tdep.c (arm_linux_arm_le_breakpoint): New.
(arm_linux_init_abi): Initialize linux-specific breakpoint.
* armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint): New.
(arm_netbsd_aout_init_abi, arm_netbsd_elf_init_abi): Split common
code out to ...
(arm_netbsd_init_abi_common): ... here; new function.
* config/arm/tm-arm.h (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT)
(THUMB_LE_BREAKPOINT, THUMB_BE_BREAKPOINT): Delete.
* config/arm/tm-linux.h (ARM_LE_BREAKPOINT): Delete.
* config/arm/tm-nbsd.h (ARM_LE_BREAKPOINT): Delete.
Diffstat (limited to 'gdb/armnbsd-tdep.c')
-rw-r--r-- | gdb/armnbsd-tdep.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c new file mode 100644 index 0000000..25c2f16 --- /dev/null +++ b/gdb/armnbsd-tdep.c @@ -0,0 +1,59 @@ +/* Target-specific functions for ARM running under NetBSD. + Copyright 2002 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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. */ + +#include "defs.h" + +#include "arm-tdep.h" + +/* For compatibility with previous implemenations of GDB on arm/NetBSD, + override the default little-endian breakpoint. */ +static const char arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6}; + +static void +arm_netbsd_init_abi_common (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + tdep->lowest_pc = 0x8000; + tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint; + tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint); +} + +static void +arm_netbsd_aout_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + arm_netbsd_init_abi_common (info, gdbarch); +} + +static void +arm_netbsd_elf_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + arm_netbsd_init_abi_common (info, gdbarch); +} + +void +_initialize_arm_netbsd_tdep (void) +{ + arm_gdbarch_register_os_abi (ARM_ABI_NETBSD_AOUT, arm_netbsd_aout_init_abi); + arm_gdbarch_register_os_abi (ARM_ABI_NETBSD_ELF, arm_netbsd_elf_init_abi); +} |