1 /* Target-dependent code for Solaris x86.
2 Copyright 2002, 2003 Free Software Foundation, Inc.
4 This file is part of GDB.
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.
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.
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. */
25 #include "i386-tdep.h"
28 i386_sol2_pc_in_sigtramp (CORE_ADDR pc
, char *name
)
30 /* Signal handler frames under Solaris 2 are recognized by a return
31 address of 0xffffffff. */
32 return (pc
== 0xffffffff);
38 i386_sol2_init_abi (struct gdbarch_info info
, struct gdbarch
*gdbarch
)
40 struct gdbarch_tdep
*tdep
= gdbarch_tdep (gdbarch
);
42 /* Solaris is SVR4-based. */
43 i386_svr4_init_abi (info
, gdbarch
);
45 /* Signal trampolines are different from SVR4, in fact they're
46 rather similar to BSD. */
47 set_gdbarch_pc_in_sigtramp (gdbarch
, i386_sol2_pc_in_sigtramp
);
48 tdep
->sigcontext_addr
= i386bsd_sigcontext_addr
;
49 tdep
->sc_pc_offset
= 36 + 14 * 4;
50 tdep
->sc_sp_offset
= 36 + 17 * 4;
55 i386_sol2_osabi_sniffer (bfd
*abfd
)
57 /* If we have a section named .SUNW_version, then it is almost
58 certainly Solaris 2. */
59 if (bfd_get_section_by_name (abfd
, ".SUNW_version"))
60 return GDB_OSABI_SOLARIS
;
62 return GDB_OSABI_UNKNOWN
;
65 /* Provide a prototype to silence -Wmissing-prototypes. */
66 void _initialize_i386_sol2_tdep (void);
69 _initialize_i386_sol2_tdep (void)
71 /* Register an ELF OS ABI sniffer for Solaris 2 binaries. */
72 gdbarch_register_osabi_sniffer (bfd_arch_i386
, bfd_target_elf_flavour
,
73 i386_sol2_osabi_sniffer
);
75 gdbarch_register_osabi (bfd_arch_i386
, 0, GDB_OSABI_SOLARIS
,
This page took 0.065394 seconds and 5 git commands to generate.