| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2310 Handle<Code> original_code(debug_info->original_code()); | 2310 Handle<Code> original_code(debug_info->original_code()); |
| 2311 #ifdef DEBUG | 2311 #ifdef DEBUG |
| 2312 // Get the code which is actually executing. | 2312 // Get the code which is actually executing. |
| 2313 Handle<Code> frame_code(frame->LookupCode()); | 2313 Handle<Code> frame_code(frame->LookupCode()); |
| 2314 ASSERT(frame_code.is_identical_to(code)); | 2314 ASSERT(frame_code.is_identical_to(code)); |
| 2315 #endif | 2315 #endif |
| 2316 | 2316 |
| 2317 // Find the call address in the running code. This address holds the call to | 2317 // Find the call address in the running code. This address holds the call to |
| 2318 // either a DebugBreakXXX or to the debug break return entry code if the | 2318 // either a DebugBreakXXX or to the debug break return entry code if the |
| 2319 // break point is still active after processing the break point. | 2319 // break point is still active after processing the break point. |
| 2320 Address addr = frame->pc() - Assembler::kPatchDebugBreakSlotReturnOffset; | 2320 Address addr = Assembler::break_address_from_break_address(frame->pc()); |
| 2321 | 2321 |
| 2322 // Check if the location is at JS exit or debug break slot. | 2322 // Check if the location is at JS exit or debug break slot. |
| 2323 bool at_js_return = false; | 2323 bool at_js_return = false; |
| 2324 bool break_at_js_return_active = false; | 2324 bool break_at_js_return_active = false; |
| 2325 bool at_debug_break_slot = false; | 2325 bool at_debug_break_slot = false; |
| 2326 RelocIterator it(debug_info->code()); | 2326 RelocIterator it(debug_info->code()); |
| 2327 while (!it.done() && !at_js_return && !at_debug_break_slot) { | 2327 while (!it.done() && !at_js_return && !at_debug_break_slot) { |
| 2328 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { | 2328 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { |
| 2329 at_js_return = (it.rinfo()->pc() == | 2329 at_js_return = (it.rinfo()->pc() == |
| 2330 addr - Assembler::kPatchReturnSequenceAddressOffset); | 2330 addr - Assembler::kPatchReturnSequenceAddressOffset); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2401 } | 2401 } |
| 2402 Handle<DebugInfo> debug_info = GetDebugInfo(shared); | 2402 Handle<DebugInfo> debug_info = GetDebugInfo(shared); |
| 2403 Handle<Code> code(debug_info->code()); | 2403 Handle<Code> code(debug_info->code()); |
| 2404 #ifdef DEBUG | 2404 #ifdef DEBUG |
| 2405 // Get the code which is actually executing. | 2405 // Get the code which is actually executing. |
| 2406 Handle<Code> frame_code(frame->LookupCode()); | 2406 Handle<Code> frame_code(frame->LookupCode()); |
| 2407 ASSERT(frame_code.is_identical_to(code)); | 2407 ASSERT(frame_code.is_identical_to(code)); |
| 2408 #endif | 2408 #endif |
| 2409 | 2409 |
| 2410 // Find the call address in the running code. | 2410 // Find the call address in the running code. |
| 2411 Address addr = frame->pc() - Assembler::kPatchDebugBreakSlotReturnOffset; | 2411 Address addr = Assembler::break_address_from_break_address(frame->pc()); |
| 2412 | 2412 |
| 2413 // Check if the location is at JS return. | 2413 // Check if the location is at JS return. |
| 2414 RelocIterator it(debug_info->code()); | 2414 RelocIterator it(debug_info->code()); |
| 2415 while (!it.done()) { | 2415 while (!it.done()) { |
| 2416 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { | 2416 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { |
| 2417 return (it.rinfo()->pc() == | 2417 return (it.rinfo()->pc() == |
| 2418 addr - Assembler::kPatchReturnSequenceAddressOffset); | 2418 addr - Assembler::kPatchReturnSequenceAddressOffset); |
| 2419 } | 2419 } |
| 2420 it.next(); | 2420 it.next(); |
| 2421 } | 2421 } |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3397 logger_->DebugEvent("Put", message.text()); | 3397 logger_->DebugEvent("Put", message.text()); |
| 3398 } | 3398 } |
| 3399 | 3399 |
| 3400 | 3400 |
| 3401 void LockingCommandMessageQueue::Clear() { | 3401 void LockingCommandMessageQueue::Clear() { |
| 3402 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3402 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 3403 queue_.Clear(); | 3403 queue_.Clear(); |
| 3404 } | 3404 } |
| 3405 | 3405 |
| 3406 } } // namespace v8::internal | 3406 } } // namespace v8::internal |
| OLD | NEW |