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

Side by Side Diff: gdb/sparcobsd-tdep.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/sparcnbsd-tdep.c ('k') | gdb/spu-linux-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 OpenBSD/sparc. 1 /* Target-dependent code for OpenBSD/sparc.
2 2
3 Copyright (C) 2004-2012 Free Software Foundation, Inc. 3 Copyright (C) 2004-2012 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.
(...skipping 29 matching lines...) Expand all
40 location in user space, which means that the traditional BSD way of 40 location in user space, which means that the traditional BSD way of
41 detecting it won't work. 41 detecting it won't work.
42 42
43 The signal trampoline will be mapped at an address that is page 43 The signal trampoline will be mapped at an address that is page
44 aligned. We recognize the signal trampoline by looking for the 44 aligned. We recognize the signal trampoline by looking for the
45 sigreturn system call. */ 45 sigreturn system call. */
46 46
47 static const int sparc32obsd_page_size = 4096; 47 static const int sparc32obsd_page_size = 4096;
48 48
49 static int 49 static int
50 sparc32obsd_pc_in_sigtramp (CORE_ADDR pc, char *name) 50 sparc32obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
51 { 51 {
52 CORE_ADDR start_pc = (pc & ~(sparc32obsd_page_size - 1)); 52 CORE_ADDR start_pc = (pc & ~(sparc32obsd_page_size - 1));
53 unsigned long insn; 53 unsigned long insn;
54 54
55 if (name) 55 if (name)
56 return 0; 56 return 0;
57 57
58 /* Check for "restore %g0, SYS_sigreturn, %g1". */ 58 /* Check for "restore %g0, SYS_sigreturn, %g1". */
59 insn = sparc_fetch_instruction (start_pc + 0xec); 59 insn = sparc_fetch_instruction (start_pc + 0xec);
60 if (insn != 0x83e82067) 60 if (insn != 0x83e82067)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum); 121 return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
122 } 122 }
123 123
124 static int 124 static int
125 sparc32obsd_sigtramp_frame_sniffer (const struct frame_unwind *self, 125 sparc32obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
126 struct frame_info *this_frame, 126 struct frame_info *this_frame,
127 void **this_cache) 127 void **this_cache)
128 { 128 {
129 CORE_ADDR pc = get_frame_pc (this_frame); 129 CORE_ADDR pc = get_frame_pc (this_frame);
130 char *name; 130 const char *name;
131 131
132 find_pc_partial_function (pc, &name, NULL, NULL); 132 find_pc_partial_function (pc, &name, NULL, NULL);
133 if (sparc32obsd_pc_in_sigtramp (pc, name)) 133 if (sparc32obsd_pc_in_sigtramp (pc, name))
134 return 1; 134 return 1;
135 135
136 return 0; 136 return 0;
137 } 137 }
138 static const struct frame_unwind sparc32obsd_sigtramp_frame_unwind = 138 static const struct frame_unwind sparc32obsd_sigtramp_frame_unwind =
139 { 139 {
140 SIGTRAMP_FRAME, 140 SIGTRAMP_FRAME,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 /* Provide a prototype to silence -Wmissing-prototypes. */ 257 /* Provide a prototype to silence -Wmissing-prototypes. */
258 void _initialize_sparc32obsd_tdep (void); 258 void _initialize_sparc32obsd_tdep (void);
259 259
260 void 260 void
261 _initialize_sparc32obsd_tdep (void) 261 _initialize_sparc32obsd_tdep (void)
262 { 262 {
263 gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_OPENBSD_ELF, 263 gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_OPENBSD_ELF,
264 sparc32obsd_init_abi); 264 sparc32obsd_init_abi);
265 } 265 }
OLDNEW
« no previous file with comments | « gdb/sparcnbsd-tdep.c ('k') | gdb/spu-linux-nat.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698