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

Side by Side Diff: gdb/nacl-tdep.c

Issue 10823232: Truncate address in amd64_nacl_software_single_step. If breakpoint is set to untruncated address, i… (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: update description Created 8 years, 4 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 | « no previous file | no next file » | 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 NaCl. 1 /* Target-dependent code for NaCl.
2 2
3 Copyright (C) 2001, 2003-2012 Free Software Foundation, Inc. 3 Copyright (C) 2001, 2003-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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 static int 126 static int
127 amd64_nacl_software_single_step (struct frame_info *frame) 127 amd64_nacl_software_single_step (struct frame_info *frame)
128 { 128 {
129 struct gdbarch *gdbarch; 129 struct gdbarch *gdbarch;
130 CORE_ADDR pc; 130 CORE_ADDR pc;
131 CORE_ADDR bp_pc; 131 CORE_ADDR bp_pc;
132 132
133 gdbarch = get_frame_arch (frame); 133 gdbarch = get_frame_arch (frame);
134 pc = get_frame_register_unsigned (frame, gdbarch_pc_regnum (gdbarch)); 134 pc = get_frame_register_unsigned (frame, gdbarch_pc_regnum (gdbarch));
135 pc = amd64_nacl_addr_bits_remove (gdbarch, pc);
135 136
136 /* Check if next instruction is rsp sandboxing. If yes, assume current 137 /* Check if next instruction is rsp sandboxing. If yes, assume current
137 instruction is rsp modification. */ 138 instruction is rsp modification. */
138 pc += gdb_insn_length (gdbarch, pc); 139 pc += gdb_insn_length (gdbarch, pc);
139 bp_pc = amd64_nacl_skip_rsp_sandboxing (pc); 140 bp_pc = amd64_nacl_skip_rsp_sandboxing (pc);
140 if (bp_pc != pc) 141 if (bp_pc != pc)
141 { 142 {
142 insert_single_step_breakpoint (gdbarch, 143 insert_single_step_breakpoint (gdbarch,
143 get_frame_address_space (frame), 144 get_frame_address_space (frame),
144 bp_pc); 145 bp_pc);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 192
192 void 193 void
193 _initialize_nacl_tdep (void) 194 _initialize_nacl_tdep (void)
194 { 195 {
195 gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, 196 gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
196 GDB_OSABI_NACL, amd64_nacl_init_abi); 197 GDB_OSABI_NACL, amd64_nacl_init_abi);
197 198
198 gdbarch_register_osabi (bfd_arch_i386, 0, 199 gdbarch_register_osabi (bfd_arch_i386, 0,
199 GDB_OSABI_NACL, i386_nacl_init_abi); 200 GDB_OSABI_NACL, i386_nacl_init_abi);
200 } 201 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698