1 /* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
3 This file is part of GDB.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 #include "windows-nat.h"
23 #define context_offset(x) ((int)&(((CONTEXT *)NULL)->x))
24 static const int mappings
[] =
35 context_offset (EFlags
),
36 context_offset (SegCs
),
37 context_offset (SegSs
),
38 context_offset (SegDs
),
39 context_offset (SegEs
),
40 context_offset (SegFs
),
41 context_offset (SegGs
),
42 context_offset (FloatSave
.RegisterArea
[0 * 10]),
43 context_offset (FloatSave
.RegisterArea
[1 * 10]),
44 context_offset (FloatSave
.RegisterArea
[2 * 10]),
45 context_offset (FloatSave
.RegisterArea
[3 * 10]),
46 context_offset (FloatSave
.RegisterArea
[4 * 10]),
47 context_offset (FloatSave
.RegisterArea
[5 * 10]),
48 context_offset (FloatSave
.RegisterArea
[6 * 10]),
49 context_offset (FloatSave
.RegisterArea
[7 * 10]),
50 context_offset (FloatSave
.ControlWord
),
51 context_offset (FloatSave
.StatusWord
),
52 context_offset (FloatSave
.TagWord
),
53 context_offset (FloatSave
.ErrorSelector
),
54 context_offset (FloatSave
.ErrorOffset
),
55 context_offset (FloatSave
.DataSelector
),
56 context_offset (FloatSave
.DataOffset
),
57 context_offset (FloatSave
.ErrorSelector
)
59 context_offset (ExtendedRegisters
[10*16]),
60 context_offset (ExtendedRegisters
[11*16]),
61 context_offset (ExtendedRegisters
[12*16]),
62 context_offset (ExtendedRegisters
[13*16]),
63 context_offset (ExtendedRegisters
[14*16]),
64 context_offset (ExtendedRegisters
[15*16]),
65 context_offset (ExtendedRegisters
[16*16]),
66 context_offset (ExtendedRegisters
[17*16]),
68 context_offset (ExtendedRegisters
[24])
73 _initialize_i386_windows_nat (void)
75 windows_set_context_register_offsets (mappings
);
This page took 0.035095 seconds and 4 git commands to generate.