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

Side by Side Diff: src/x64/debug-x64.cc

Issue 267116: Fix X64 build in the case that debugger support is disabled. Change function... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | 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 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 21 matching lines...) Expand all
32 #include "debug.h" 32 #include "debug.h"
33 33
34 34
35 namespace v8 { 35 namespace v8 {
36 namespace internal { 36 namespace internal {
37 37
38 #ifdef ENABLE_DEBUGGER_SUPPORT 38 #ifdef ENABLE_DEBUGGER_SUPPORT
39 39
40 bool Debug::IsDebugBreakAtReturn(v8::internal::RelocInfo* rinfo) { 40 bool Debug::IsDebugBreakAtReturn(v8::internal::RelocInfo* rinfo) {
41 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode())); 41 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()));
42 // 11th byte of patch is 0x49 (REX.WB byte of computed jump/call to r10), 42 return rinfo->IsPatchedReturnSequence();
43 // 11th byte of JS return is 0xCC (int3).
44 ASSERT(*(rinfo->pc() + 10) == 0x49 || *(rinfo->pc() + 10) == 0xCC);
45 return (*(rinfo->pc() + 10) != 0xCC);
46 } 43 }
47 44
48 #define __ ACCESS_MASM(masm) 45 #define __ ACCESS_MASM(masm)
49 46
50 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, 47 static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
51 RegList pointer_regs, 48 RegList pointer_regs,
52 bool convert_call_to_jmp) { 49 bool convert_call_to_jmp) {
53 // Save the content of all general purpose registers in memory. This copy in 50 // Save the content of all general purpose registers in memory. This copy in
54 // memory is later pushed onto the JS expression stack for the fake JS frame 51 // memory is later pushed onto the JS expression stack for the fake JS frame
55 // generated and also to the C frame generated on top of that. In the JS 52 // generated and also to the C frame generated on top of that. In the JS
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 192
196 void BreakLocationIterator::SetDebugBreakAtReturn() { 193 void BreakLocationIterator::SetDebugBreakAtReturn() {
197 ASSERT(Debug::kX64JSReturnSequenceLength >= Debug::kX64CallInstructionLength); 194 ASSERT(Debug::kX64JSReturnSequenceLength >= Debug::kX64CallInstructionLength);
198 rinfo()->PatchCodeWithCall(Debug::debug_break_return()->entry(), 195 rinfo()->PatchCodeWithCall(Debug::debug_break_return()->entry(),
199 Debug::kX64JSReturnSequenceLength - Debug::kX64CallInstructionLength); 196 Debug::kX64JSReturnSequenceLength - Debug::kX64CallInstructionLength);
200 } 197 }
201 198
202 #endif // ENABLE_DEBUGGER_SUPPORT 199 #endif // ENABLE_DEBUGGER_SUPPORT
203 200
204 } } // namespace v8::internal 201 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698