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

Side by Side Diff: gdb/xtensa-linux-nat.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/xtensa-config.c ('k') | gdb/xtensa-tdep.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 /* Xtensa GNU/Linux native support. 1 /* Xtensa GNU/Linux native support.
2 2
3 Copyright (C) 2007-2012 Free Software Foundation, Inc. 3 Copyright (C) 2007-2013 Free Software Foundation, Inc.
4 4
5 This file is part of GDB. 5 This file is part of GDB.
6 6
7 This program is free software; you can redistribute it and/or modify 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 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or 9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 #include "defs.h" 20 #include "defs.h"
21 #include "gdb_string.h" 21 #include <string.h>
22 #include "frame.h" 22 #include "frame.h"
23 #include "inferior.h" 23 #include "inferior.h"
24 #include "gdbcore.h" 24 #include "gdbcore.h"
25 #include "regcache.h" 25 #include "regcache.h"
26 #include "gdb_assert.h" 26 #include "gdb_assert.h"
27 #include "target.h" 27 #include "target.h"
28 #include "linux-nat.h" 28 #include "linux-nat.h"
29 29
30 #include <stdint.h> 30 #include <stdint.h>
31 #include <sys/types.h> 31 #include <sys/types.h>
32 #include <sys/param.h>
33 #include <signal.h> 32 #include <signal.h>
34 #include <sys/user.h> 33 #include <sys/user.h>
35 #include <sys/ioctl.h> 34 #include <sys/ioctl.h>
36 #include "gdb_wait.h" 35 #include "gdb_wait.h"
37 #include <fcntl.h> 36 #include <fcntl.h>
38 #include <sys/procfs.h> 37 #include <sys/procfs.h>
39 #include <sys/ptrace.h> 38 #include <sys/ptrace.h>
40 39
41 #include "gregset.h" 40 #include "gregset.h"
42 #include "xtensa-tdep.h" 41 #include "xtensa-tdep.h"
43 42
44 /* Extended register set depends on hardware configs. 43 /* Extended register set depends on hardware configs.
45 Keeping these definitions separately allows to introduce 44 Keeping these definitions separately allows to introduce
46 hardware-specific overlays. */ 45 hardware-specific overlays. */
47 #include "xtensa-xtregs.c" 46 #include "xtensa-xtregs.c"
48 47
49 static int 48 static int
50 get_thread_id (ptid_t ptid) 49 get_thread_id (ptid_t ptid)
51 { 50 {
52 int tid = TIDGET (ptid); 51 int tid = ptid_get_lwp (ptid);
53 if (0 == tid) 52 if (0 == tid)
54 tid = PIDGET (ptid); 53 tid = ptid_get_pid (ptid);
55 return tid; 54 return tid;
56 } 55 }
57 #define GET_THREAD_ID(PTID) get_thread_id (PTID) 56 #define GET_THREAD_ID(PTID) get_thread_id (PTID)
58 57
59 void 58 void
60 fill_gregset (const struct regcache *regcache, 59 fill_gregset (const struct regcache *regcache,
61 gdb_gregset_t *gregsetp, int regnum) 60 gdb_gregset_t *gregsetp, int regnum)
62 { 61 {
63 int i; 62 int i;
64 xtensa_elf_gregset_t *regs = (xtensa_elf_gregset_t *) gregsetp; 63 xtensa_elf_gregset_t *regs = (xtensa_elf_gregset_t *) gregsetp;
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 314
316 /* Fill in the generic GNU/Linux methods. */ 315 /* Fill in the generic GNU/Linux methods. */
317 t = linux_target (); 316 t = linux_target ();
318 317
319 /* Add our register access methods. */ 318 /* Add our register access methods. */
320 t->to_fetch_registers = xtensa_linux_fetch_inferior_registers; 319 t->to_fetch_registers = xtensa_linux_fetch_inferior_registers;
321 t->to_store_registers = xtensa_linux_store_inferior_registers; 320 t->to_store_registers = xtensa_linux_store_inferior_registers;
322 321
323 linux_nat_add_target (t); 322 linux_nat_add_target (t);
324 } 323 }
OLDNEW
« no previous file with comments | « gdb/xtensa-config.c ('k') | gdb/xtensa-tdep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698