Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(995)

Side by Side Diff: gdb/i386-windows-nat.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/i386-tdep.c ('k') | gdb/i386bsd-nat.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (C) 2008-2012 Free Software Foundation, Inc. 1 /* Copyright (C) 2008-2012 Free Software Foundation, Inc.
2 2
3 This file is part of GDB. 3 This file is part of GDB.
4 4
5 This program is free software; you can redistribute it and/or modify 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 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 7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 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/>. */ 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 17
18 #include "defs.h" 18 #include "defs.h"
19 #include "windows-nat.h" 19 #include "windows-nat.h"
20 #include "i386-nat.h" 20 #include "i386-nat.h"
21 #include "i386-tdep.h"
21 22
22 #include <windows.h> 23 #include <windows.h>
23 24
24 #define context_offset(x) ((int)&(((CONTEXT *)NULL)->x)) 25 #define context_offset(x) ((int)&(((CONTEXT *)NULL)->x))
25 static const int mappings[] = 26 static const int mappings[] =
26 { 27 {
27 context_offset (Eax), 28 context_offset (Eax),
28 context_offset (Ecx), 29 context_offset (Ecx),
29 context_offset (Edx), 30 context_offset (Edx),
30 context_offset (Ebx), 31 context_offset (Ebx),
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 context_offset (ExtendedRegisters[13*16]), 64 context_offset (ExtendedRegisters[13*16]),
64 context_offset (ExtendedRegisters[14*16]), 65 context_offset (ExtendedRegisters[14*16]),
65 context_offset (ExtendedRegisters[15*16]), 66 context_offset (ExtendedRegisters[15*16]),
66 context_offset (ExtendedRegisters[16*16]), 67 context_offset (ExtendedRegisters[16*16]),
67 context_offset (ExtendedRegisters[17*16]), 68 context_offset (ExtendedRegisters[17*16]),
68 /* MXCSR */ 69 /* MXCSR */
69 context_offset (ExtendedRegisters[24]) 70 context_offset (ExtendedRegisters[24])
70 }; 71 };
71 #undef context_offset 72 #undef context_offset
72 73
74 /* segment_register_p_ftype implementation for x86. */
75
76 static int
77 i386_windows_segment_register_p (int regnum)
78 {
79 return regnum >= I386_CS_REGNUM && regnum <= I386_GS_REGNUM;
80 }
81
82 /* -Wmissing-prototypes */
83 extern initialize_file_ftype _initialize_i386_windows_nat;
84
73 void 85 void
74 _initialize_i386_windows_nat (void) 86 _initialize_i386_windows_nat (void)
75 { 87 {
76 windows_set_context_register_offsets (mappings); 88 windows_set_context_register_offsets (mappings);
89 windows_set_segment_register_p (i386_windows_segment_register_p);
77 i386_set_debug_register_length (4); 90 i386_set_debug_register_length (4);
78 } 91 }
OLDNEW
« no previous file with comments | « gdb/i386-tdep.c ('k') | gdb/i386bsd-nat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698