* configure.tgt (arm*-*-netbsd*): This variant is now fully multi-arch.
[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
41d39a95
RE
33static int
34arm_netbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
35{
36 if (strcmp (name, "_PROCEDURE_LINKAGE_TABLE_") == 0)
37 return 1;
38
39 return 0;
40}
41
66e810cd
RE
42static void
43arm_netbsd_init_abi_common (struct gdbarch_info info,
44 struct gdbarch *gdbarch)
45{
46 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
47
48 tdep->lowest_pc = 0x8000;
49 tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
50 tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
9df628e0
RE
51
52 tdep->jb_pc = JB_PC;
53 tdep->jb_elt_size = JB_ELEMENT_SIZE;
66e810cd
RE
54}
55
56static void
57arm_netbsd_aout_init_abi (struct gdbarch_info info,
58 struct gdbarch *gdbarch)
59{
60 arm_netbsd_init_abi_common (info, gdbarch);
41d39a95
RE
61
62 set_gdbarch_in_solib_call_trampoline
63 (gdbarch, arm_netbsd_aout_in_solib_call_trampoline);
66e810cd
RE
64}
65
66static void
67arm_netbsd_elf_init_abi (struct gdbarch_info info,
68 struct gdbarch *gdbarch)
69{
70 arm_netbsd_init_abi_common (info, gdbarch);
71}
72
73void
74_initialize_arm_netbsd_tdep (void)
75{
76 arm_gdbarch_register_os_abi (ARM_ABI_NETBSD_AOUT, arm_netbsd_aout_init_abi);
77 arm_gdbarch_register_os_abi (ARM_ABI_NETBSD_ELF, arm_netbsd_elf_init_abi);
78}
This page took 0.031346 seconds and 4 git commands to generate.