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

Side by Side Diff: gdb/i386-nto-tdep.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 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-nat.c ('k') | gdb/i386-sol2-nat.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Target-dependent code for QNX Neutrino x86. 1 /* Target-dependent code for QNX Neutrino x86.
2 2
3 Copyright (C) 2003-2004, 2007-2012 Free Software Foundation, Inc. 3 Copyright (C) 2003-2013 Free Software Foundation, Inc.
4 4
5 Contributed by QNX Software Systems Ltd. 5 Contributed by QNX Software Systems Ltd.
6 6
7 This file is part of GDB. 7 This file is part of GDB.
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or 11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version. 12 (at your option) any later version.
13 13
14 This program is distributed in the hope that it will be useful, 14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details. 17 GNU General Public License for more details.
18 18
19 You should have received a copy of the GNU General Public License 19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 21
22 #include "defs.h" 22 #include "defs.h"
23 #include "frame.h" 23 #include "frame.h"
24 #include "osabi.h" 24 #include "osabi.h"
25 #include "regcache.h" 25 #include "regcache.h"
26 #include "target.h" 26 #include "target.h"
27 27
28 #include "gdb_assert.h" 28 #include "gdb_assert.h"
29 #include "gdb_string.h" 29 #include <string.h>
30 30
31 #include "i386-tdep.h" 31 #include "i386-tdep.h"
32 #include "i387-tdep.h" 32 #include "i387-tdep.h"
33 #include "nto-tdep.h" 33 #include "nto-tdep.h"
34 #include "solib.h" 34 #include "solib.h"
35 #include "solib-svr4.h" 35 #include "solib-svr4.h"
36 36
37 #ifndef X86_CPU_FXSR 37 #ifndef X86_CPU_FXSR
38 #define X86_CPU_FXSR (1L << 12) 38 #define X86_CPU_FXSR (1L << 12)
39 #endif 39 #endif
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 288
289 /* Assuming THIS_FRAME is a QNX Neutrino sigtramp routine, return the 289 /* Assuming THIS_FRAME is a QNX Neutrino sigtramp routine, return the
290 address of the associated sigcontext structure. */ 290 address of the associated sigcontext structure. */
291 291
292 static CORE_ADDR 292 static CORE_ADDR
293 i386nto_sigcontext_addr (struct frame_info *this_frame) 293 i386nto_sigcontext_addr (struct frame_info *this_frame)
294 { 294 {
295 struct gdbarch *gdbarch = get_frame_arch (this_frame); 295 struct gdbarch *gdbarch = get_frame_arch (this_frame);
296 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); 296 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
297 char buf[4]; 297 gdb_byte buf[4];
298 CORE_ADDR ptrctx; 298 CORE_ADDR ptrctx;
299 299
300 /* We store __ucontext_t addr in EDI register. */ 300 /* We store __ucontext_t addr in EDI register. */
301 get_frame_register (this_frame, I386_EDI_REGNUM, buf); 301 get_frame_register (this_frame, I386_EDI_REGNUM, buf);
302 ptrctx = extract_unsigned_integer (buf, 4, byte_order); 302 ptrctx = extract_unsigned_integer (buf, 4, byte_order);
303 ptrctx += 24 /* Context pointer is at this offset. */; 303 ptrctx += 24 /* Context pointer is at this offset. */;
304 304
305 return ptrctx; 305 return ptrctx;
306 } 306 }
307 307
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 void 377 void
378 _initialize_i386nto_tdep (void) 378 _initialize_i386nto_tdep (void)
379 { 379 {
380 init_i386nto_ops (); 380 init_i386nto_ops ();
381 gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_QNXNTO, 381 gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_QNXNTO,
382 i386nto_init_abi); 382 i386nto_init_abi);
383 gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour, 383 gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour,
384 nto_elf_osabi_sniffer); 384 nto_elf_osabi_sniffer);
385 } 385 }
OLDNEW
« no previous file with comments | « gdb/i386-nat.c ('k') | gdb/i386-sol2-nat.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698