* gdbarch.sh (GET_LONGJMP_TARGET): Add rule.
[deliverable/binutils-gdb.git] / gdb / armnbsd-tdep.c
CommitLineData
66e810cd
RE
1/* Target-specific functions for ARM running under NetBSD.
2 Copyright 2002 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21#include "defs.h"
22
23#include "arm-tdep.h"
24
9df628e0
RE
25/* Description of the longjmp buffer. */
26#define JB_PC 24
27#define JB_ELEMENT_SIZE INT_REGISTER_RAW_SIZE
28
66e810cd
RE
29/* For compatibility with previous implemenations of GDB on arm/NetBSD,
30 override the default little-endian breakpoint. */
31static const char arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6};
32
33static void
34arm_netbsd_init_abi_common (struct gdbarch_info info,
35 struct gdbarch *gdbarch)
36{
37 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
38
39 tdep->lowest_pc = 0x8000;
40 tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
41 tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
9df628e0
RE
42
43 tdep->jb_pc = JB_PC;
44 tdep->jb_elt_size = JB_ELEMENT_SIZE;
66e810cd
RE
45}
46
47static void
48arm_netbsd_aout_init_abi (struct gdbarch_info info,
49 struct gdbarch *gdbarch)
50{
51 arm_netbsd_init_abi_common (info, gdbarch);
52}
53
54static void
55arm_netbsd_elf_init_abi (struct gdbarch_info info,
56 struct gdbarch *gdbarch)
57{
58 arm_netbsd_init_abi_common (info, gdbarch);
59}
60
61void
62_initialize_arm_netbsd_tdep (void)
63{
64 arm_gdbarch_register_os_abi (ARM_ABI_NETBSD_AOUT, arm_netbsd_aout_init_abi);
65 arm_gdbarch_register_os_abi (ARM_ABI_NETBSD_ELF, arm_netbsd_elf_init_abi);
66}
This page took 0.026278 seconds and 4 git commands to generate.