* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and
[deliverable/binutils-gdb.git] / gdb / i386-sol2-tdep.c
1 /* Target-dependent code for Solaris x86.
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 "i386-tdep.h"
24
25 static int
26 i386_sol2_pc_in_sigtramp (CORE_ADDR pc, char *name)
27 {
28 /* Signal handler frames under Solaris 2 are recognized by a return
29 address of 0xffffffff. */
30 return (pc == 0xffffffff);
31 }
32
33 /* Solaris 2. */
34
35 static void
36 i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
37 {
38 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
39
40 /* Solaris is SVR4-based. */
41 i386_svr4_init_abi (info, gdbarch);
42
43 /* Signal trampolines are different from SVR4, in fact they're
44 rather similar to BSD. */
45 set_gdbarch_pc_in_sigtramp (gdbarch, i386_sol2_pc_in_sigtramp);
46 tdep->sigtramp_saved_pc = i386bsd_sigtramp_saved_pc;
47 tdep->sc_pc_offset = 36 + 14 * 4;
48 }
49 \f
50
51 /* Provide a prototype to silence -Wmissing-prototypes. */
52 void _initialize_i386_sol2_tdep (void);
53
54 void
55 _initialize_i386_sol2_tdep (void)
56 {
57 gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_SOLARIS,
58 i386_sol2_init_abi);
59 }
This page took 0.031023 seconds and 5 git commands to generate.