]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - gnu/usr.bin/gdb/arch/arm/armfbsd-tdep.c
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / gnu / usr.bin / gdb / arch / arm / armfbsd-tdep.c
1 /* $FreeBSD$ */
2
3 /* Target-specific functions for ARM running under NetBSD.
4    Copyright 2002, 2003 Free Software Foundation, Inc.
5
6    This file is part of GDB.
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 59 Temple Place - Suite 330,
21    Boston, MA 02111-1307, USA.  */
22
23 #include "defs.h"
24 #include "osabi.h"
25
26 #include "arch-utils.h"
27 #include "arm-tdep.h"
28 #include "solib-svr4.h"
29
30 /* Description of the longjmp buffer.  */
31 #define ARM_FBSD_JB_PC 24
32 #define ARM_FBSD_JB_ELEMENT_SIZE INT_REGISTER_SIZE
33
34 static void
35 arm_freebsd_init_abi_common (struct gdbarch_info info,
36                             struct gdbarch *gdbarch)
37 {
38   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
39
40   tdep->lowest_pc = 0x8000;
41
42   tdep->jb_pc = ARM_FBSD_JB_PC;
43   tdep->jb_elt_size = ARM_FBSD_JB_ELEMENT_SIZE;
44 }
45   
46 static void
47 arm_freebsd_elf_init_abi (struct gdbarch_info info, 
48                          struct gdbarch *gdbarch)
49 {
50   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
51
52   arm_freebsd_init_abi_common (info, gdbarch);
53
54   /* FreeBSD ELF uses SVR4-style shared libraries.  */
55   set_gdbarch_in_solib_call_trampoline
56     (gdbarch, generic_in_solib_call_trampoline);
57   set_solib_svr4_fetch_link_map_offsets
58     (gdbarch, svr4_ilp32_fetch_link_map_offsets);
59
60   tdep->fp_model = ARM_FLOAT_SOFT_VFP;
61 }
62
63 void
64 _initialize_armfbsd_tdep (void)
65 {
66   gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_FREEBSD_ELF,
67                           arm_freebsd_elf_init_abi);
68 }