| OLD | NEW |
| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { | 154 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
| 155 // Register state just before return from JS function (from codegen-x64.cc). | 155 // Register state just before return from JS function (from codegen-x64.cc). |
| 156 // ----------- S t a t e ------------- | 156 // ----------- S t a t e ------------- |
| 157 // -- rax: return value | 157 // -- rax: return value |
| 158 // ----------------------------------- | 158 // ----------------------------------- |
| 159 Generate_DebugBreakCallHelper(masm, rax.bit(), true); | 159 Generate_DebugBreakCallHelper(masm, rax.bit(), true); |
| 160 } | 160 } |
| 161 | 161 |
| 162 | 162 |
| 163 void Debug::GenerateReturnDebugBreakEntry(MacroAssembler* masm) { | |
| 164 // OK to clobber rbx as we are returning from a JS function through the code | |
| 165 // generated by CodeGenerator::GenerateReturnSequence() | |
| 166 ExternalReference debug_break_return = | |
| 167 ExternalReference(Debug_Address::DebugBreakReturn()); | |
| 168 __ movq(rbx, debug_break_return); | |
| 169 __ movq(rbx, Operand(rbx, 0)); | |
| 170 __ addq(rbx, Immediate(Code::kHeaderSize - kHeapObjectTag)); | |
| 171 __ jmp(rbx); | |
| 172 } | |
| 173 | |
| 174 | |
| 175 void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) { | 163 void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) { |
| 176 // REgister state for IC store call (from ic-x64.cc). | 164 // REgister state for IC store call (from ic-x64.cc). |
| 177 // ----------- S t a t e ------------- | 165 // ----------- S t a t e ------------- |
| 178 // -- rax : value | 166 // -- rax : value |
| 179 // -- rcx : name | 167 // -- rcx : name |
| 180 // ----------------------------------- | 168 // ----------------------------------- |
| 181 Generate_DebugBreakCallHelper(masm, rax.bit() | rcx.bit(), false); | 169 Generate_DebugBreakCallHelper(masm, rax.bit() | rcx.bit(), false); |
| 182 } | 170 } |
| 183 | 171 |
| 184 | 172 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 200 } | 188 } |
| 201 | 189 |
| 202 | 190 |
| 203 bool BreakLocationIterator::IsDebugBreakAtReturn() { | 191 bool BreakLocationIterator::IsDebugBreakAtReturn() { |
| 204 return Debug::IsDebugBreakAtReturn(rinfo()); | 192 return Debug::IsDebugBreakAtReturn(rinfo()); |
| 205 } | 193 } |
| 206 | 194 |
| 207 | 195 |
| 208 void BreakLocationIterator::SetDebugBreakAtReturn() { | 196 void BreakLocationIterator::SetDebugBreakAtReturn() { |
| 209 ASSERT(Debug::kX64JSReturnSequenceLength >= Debug::kX64CallInstructionLength); | 197 ASSERT(Debug::kX64JSReturnSequenceLength >= Debug::kX64CallInstructionLength); |
| 210 rinfo()->PatchCodeWithCall(Debug::debug_break_return_entry()->entry(), | 198 rinfo()->PatchCodeWithCall(Debug::debug_break_return()->entry(), |
| 211 Debug::kX64JSReturnSequenceLength - Debug::kX64CallInstructionLength); | 199 Debug::kX64JSReturnSequenceLength - Debug::kX64CallInstructionLength); |
| 212 } | 200 } |
| 213 | 201 |
| 214 #endif // ENABLE_DEBUGGER_SUPPORT | 202 #endif // ENABLE_DEBUGGER_SUPPORT |
| 215 | 203 |
| 216 } } // namespace v8::internal | 204 } } // namespace v8::internal |
| OLD | NEW |