* arm-wince-tdep.c (ARM_WINCE_JB_PC): Change to 10.
[deliverable/binutils-gdb.git] / gdb / i386-cygwin-tdep.c
CommitLineData
1762d96d 1/* Target-dependent code for Cygwin running on i386's, for GDB.
acd5c798 2
6aba47ca 3 Copyright (C) 2003, 2007 Free Software Foundation, Inc.
1762d96d 4
acd5c798 5 This file is part of GDB.
1762d96d 6
acd5c798
MK
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
a9762ec7 9 the Free Software Foundation; either version 3 of the License, or
acd5c798 10 (at your option) any later version.
1762d96d 11
acd5c798
MK
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.
1762d96d 16
acd5c798 17 You should have received a copy of the GNU General Public License
a9762ec7 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
1762d96d
CV
19
20#include "defs.h"
1762d96d 21#include "osabi.h"
f870b49b 22
acd5c798 23#include "gdb_string.h"
f870b49b 24
acd5c798 25#include "i386-tdep.h"
1762d96d 26
f7948b5f 27static CORE_ADDR
52f729a7 28i386_cygwin_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
f7948b5f
JB
29{
30 return i386_pe_skip_trampoline_code (pc, NULL);
31}
32
1762d96d
CV
33static void
34i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
35{
36 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
37
f7948b5f
JB
38 set_gdbarch_skip_trampoline_code (gdbarch, i386_cygwin_skip_trampoline_code);
39
1762d96d
CV
40 tdep->struct_return = reg_struct_return;
41}
42
43static enum gdb_osabi
44i386_cygwin_osabi_sniffer (bfd * abfd)
45{
46 char *target_name = bfd_get_target (abfd);
47
48 /* Interix also uses pei-i386.
49 We need a way to distinguish between the two. */
50 if (strcmp (target_name, "pei-i386") == 0)
51 return GDB_OSABI_CYGWIN;
52
53 return GDB_OSABI_UNKNOWN;
54}
55
acd5c798
MK
56/* Provide a prototype to silence -Wmissing-prototypes. */
57void _initialize_i386_cygwin_tdep (void);
58
1762d96d
CV
59void
60_initialize_i386_cygwin_tdep (void)
61{
62 gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
63 i386_cygwin_osabi_sniffer);
64
65 gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_CYGWIN,
66 i386_cygwin_init_abi);
67}
This page took 0.313892 seconds and 4 git commands to generate.