bfd/
[deliverable/binutils-gdb.git] / gdb / ns32knbsd-tdep.c
CommitLineData
93d5585d
JT
1/* Target-dependent code for NS32000 systems running NetBSD.
2 Copyright 2002 Free Software Foundation, Inc.
3 Contributed by Wasabi Systems, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22#include "defs.h"
23
24#include "ns32k-tdep.h"
25
26static int
27ns32knbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
28{
29 if (strcmp (name, "_DYNAMIC") == 0)
30 return 1;
31
32 return 0;
33}
34
35static void
36ns32knbsd_init_abi_common (struct gdbarch_info info,
37 struct gdbarch *gdbarch)
38{
39 /* We only support machines with the 32382 FPU. */
40 ns32k_gdbarch_init_32382 (gdbarch);
41}
42
43static void
44ns32knbsd_init_abi_aout (struct gdbarch_info info,
45 struct gdbarch *gdbarch)
46{
47 ns32knbsd_init_abi_common (info, gdbarch);
48
49 set_gdbarch_in_solib_call_trampoline (gdbarch,
50 ns32knbsd_aout_in_solib_call_trampoline);
51}
52
53static enum gdb_osabi
54ns32knbsd_aout_osabi_sniffer (bfd *abfd)
55{
56 if (strcmp (bfd_get_target (abfd), "a.out-ns32k-netbsd") == 0)
57 return GDB_OSABI_NETBSD_AOUT;
58
59 return GDB_OSABI_UNKNOWN;
60}
61
62void
63_initialize_ns32knbsd_tdep (void)
64{
65 gdbarch_register_osabi_sniffer (bfd_arch_ns32k, bfd_target_aout_flavour,
66 ns32knbsd_aout_osabi_sniffer);
67
68 gdbarch_register_osabi (bfd_arch_ns32k, GDB_OSABI_NETBSD_AOUT,
69 ns32knbsd_init_abi_aout);
70}
This page took 0.059154 seconds and 4 git commands to generate.