kernel NFS - Fix another deadlock in the readdirplus code
[dragonfly.git] / contrib / gdb-7 / gdb / i386dfly-tdep.c
blob92134d1b98842ea1167117b82ec257475442340e
1 /* Target-dependent code for DragonFly/i386.
3 Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
4 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 #include "defs.h"
22 #include "arch-utils.h"
23 #include "gdbcore.h"
24 #include "osabi.h"
25 #include "regcache.h"
27 #include "gdb_assert.h"
29 #include "i386-tdep.h"
30 #include "i387-tdep.h"
31 #include "bsd-uthread.h"
32 #include "solib-svr4.h"
34 static int i386dfly_r_reg_offset[] =
36 44, /* %eax */
37 40, /* %ecx */
38 36, /* %edx */
39 32, /* %ebx */
40 72, /* %esp */
41 24, /* %ebp */
42 20, /* %esi */
43 16, /* %edi */
44 60, /* %eip */
45 68, /* %eflags */
46 64, /* %cs */
47 76, /* %ss */
48 12, /* %ds */
49 8, /* %es */
50 4, /* %fs */
51 0 /* %gs */
54 /* Sigtramp routine location. */
55 CORE_ADDR i386dfly_sigtramp_start_addr = 0xbfbfdf20;
56 CORE_ADDR i386dfly_sigtramp_end_addr = 0xbfbfdff0;
58 int i386dfly_sc_reg_offset[] =
60 64, /* %eax */
61 60, /* %ecx */
62 56, /* %edx */
63 52, /* %ebx */
64 92, /* %esp */
65 44, /* %ebp */
66 40, /* %esi */
67 36, /* %edi */
68 80, /* %eip */
69 88, /* %eflags */
70 84, /* %cs */
71 96, /* %ss */
72 32, /* %ds */
73 28, /* %es */
74 24, /* %fs */
75 20 /* %gs */
78 static void
79 i386dfly_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
81 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
83 i386fbsd4_init_abi(info, gdbarch);
85 tdep->gregset_reg_offset = i386dfly_r_reg_offset;
86 tdep->gregset_num_regs = ARRAY_SIZE (i386dfly_r_reg_offset);
87 tdep->sizeof_gregset = 80;
89 tdep->sc_reg_offset = i386dfly_sc_reg_offset;
90 tdep->sc_num_regs = ARRAY_SIZE (i386dfly_sc_reg_offset);
94 /* Provide a prototype to silence -Wmissing-prototypes. */
95 void _initialize_i386dfly_tdep (void);
97 void
98 _initialize_i386dfly_tdep (void)
100 gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_DRAGONFLY,
101 i386dfly_init_abi);