1162298Simp/* $FreeBSD$ */ 2162298Simp 3162298Simp/* Target-specific functions for ARM running under NetBSD. 4162298Simp Copyright 2002, 2003 Free Software Foundation, Inc. 5162298Simp 6162298Simp This file is part of GDB. 7162298Simp 8162298Simp This program is free software; you can redistribute it and/or modify 9162298Simp it under the terms of the GNU General Public License as published by 10162298Simp the Free Software Foundation; either version 2 of the License, or 11162298Simp (at your option) any later version. 12162298Simp 13162298Simp This program is distributed in the hope that it will be useful, 14162298Simp but WITHOUT ANY WARRANTY; without even the implied warranty of 15162298Simp MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16162298Simp GNU General Public License for more details. 17162298Simp 18162298Simp You should have received a copy of the GNU General Public License 19162298Simp along with this program; if not, write to the Free Software 20162298Simp Foundation, Inc., 59 Temple Place - Suite 330, 21162298Simp Boston, MA 02111-1307, USA. */ 22162298Simp 23162298Simp#include "defs.h" 24162298Simp#include "osabi.h" 25162298Simp 26162298Simp#include "arch-utils.h" 27162298Simp#include "arm-tdep.h" 28162298Simp#include "solib-svr4.h" 29162298Simp 30162298Simp/* Description of the longjmp buffer. */ 31162298Simp#define ARM_FBSD_JB_PC 24 32162298Simp#define ARM_FBSD_JB_ELEMENT_SIZE INT_REGISTER_SIZE 33162298Simp 34162298Simpstatic void 35162298Simparm_freebsd_init_abi_common (struct gdbarch_info info, 36162298Simp struct gdbarch *gdbarch) 37162298Simp{ 38162298Simp struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 39162298Simp 40162298Simp tdep->lowest_pc = 0x8000; 41162298Simp 42162298Simp tdep->jb_pc = ARM_FBSD_JB_PC; 43162298Simp tdep->jb_elt_size = ARM_FBSD_JB_ELEMENT_SIZE; 44162298Simp} 45162298Simp 46162298Simpstatic void 47162298Simparm_freebsd_elf_init_abi (struct gdbarch_info info, 48162298Simp struct gdbarch *gdbarch) 49162298Simp{ 50162298Simp struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 51162298Simp 52162298Simp arm_freebsd_init_abi_common (info, gdbarch); 53162298Simp 54162298Simp /* FreeBSD ELF uses SVR4-style shared libraries. */ 55162298Simp set_gdbarch_in_solib_call_trampoline 56162298Simp (gdbarch, generic_in_solib_call_trampoline); 57162298Simp set_solib_svr4_fetch_link_map_offsets 58162298Simp (gdbarch, svr4_ilp32_fetch_link_map_offsets); 59162298Simp 60162298Simp tdep->fp_model = ARM_FLOAT_SOFT_VFP; 61162298Simp} 62162298Simp 63162298Simpvoid 64162298Simp_initialize_armfbsd_tdep (void) 65162298Simp{ 66162298Simp gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_FREEBSD_ELF, 67162298Simp arm_freebsd_elf_init_abi); 68162298Simp} 69