| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2278 Handle<Code> original_code(debug_info->original_code()); | 2278 Handle<Code> original_code(debug_info->original_code()); |
| 2279 #ifdef DEBUG | 2279 #ifdef DEBUG |
| 2280 // Get the code which is actually executing. | 2280 // Get the code which is actually executing. |
| 2281 Handle<Code> frame_code(frame->LookupCode()); | 2281 Handle<Code> frame_code(frame->LookupCode()); |
| 2282 ASSERT(frame_code.is_identical_to(code)); | 2282 ASSERT(frame_code.is_identical_to(code)); |
| 2283 #endif | 2283 #endif |
| 2284 | 2284 |
| 2285 // Find the call address in the running code. This address holds the call to | 2285 // Find the call address in the running code. This address holds the call to |
| 2286 // either a DebugBreakXXX or to the debug break return entry code if the | 2286 // either a DebugBreakXXX or to the debug break return entry code if the |
| 2287 // break point is still active after processing the break point. | 2287 // break point is still active after processing the break point. |
| 2288 Address addr = frame->pc() - Assembler::kCallTargetAddressOffset; | 2288 Address addr = frame->pc() - Assembler::kPatchDebugBreakSlotReturnOffset; |
| 2289 | 2289 |
| 2290 // Check if the location is at JS exit or debug break slot. | 2290 // Check if the location is at JS exit or debug break slot. |
| 2291 bool at_js_return = false; | 2291 bool at_js_return = false; |
| 2292 bool break_at_js_return_active = false; | 2292 bool break_at_js_return_active = false; |
| 2293 bool at_debug_break_slot = false; | 2293 bool at_debug_break_slot = false; |
| 2294 RelocIterator it(debug_info->code()); | 2294 RelocIterator it(debug_info->code()); |
| 2295 while (!it.done() && !at_js_return && !at_debug_break_slot) { | 2295 while (!it.done() && !at_js_return && !at_debug_break_slot) { |
| 2296 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { | 2296 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { |
| 2297 at_js_return = (it.rinfo()->pc() == | 2297 at_js_return = (it.rinfo()->pc() == |
| 2298 addr - Assembler::kPatchReturnSequenceAddressOffset); | 2298 addr - Assembler::kPatchReturnSequenceAddressOffset); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 } | 2367 } |
| 2368 Handle<DebugInfo> debug_info = GetDebugInfo(shared); | 2368 Handle<DebugInfo> debug_info = GetDebugInfo(shared); |
| 2369 Handle<Code> code(debug_info->code()); | 2369 Handle<Code> code(debug_info->code()); |
| 2370 #ifdef DEBUG | 2370 #ifdef DEBUG |
| 2371 // Get the code which is actually executing. | 2371 // Get the code which is actually executing. |
| 2372 Handle<Code> frame_code(frame->LookupCode()); | 2372 Handle<Code> frame_code(frame->LookupCode()); |
| 2373 ASSERT(frame_code.is_identical_to(code)); | 2373 ASSERT(frame_code.is_identical_to(code)); |
| 2374 #endif | 2374 #endif |
| 2375 | 2375 |
| 2376 // Find the call address in the running code. | 2376 // Find the call address in the running code. |
| 2377 Address addr = frame->pc() - Assembler::kCallTargetAddressOffset; | 2377 Address addr = frame->pc() - Assembler::kPatchDebugBreakSlotReturnOffset; |
| 2378 | 2378 |
| 2379 // Check if the location is at JS return. | 2379 // Check if the location is at JS return. |
| 2380 RelocIterator it(debug_info->code()); | 2380 RelocIterator it(debug_info->code()); |
| 2381 while (!it.done()) { | 2381 while (!it.done()) { |
| 2382 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { | 2382 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { |
| 2383 return (it.rinfo()->pc() == | 2383 return (it.rinfo()->pc() == |
| 2384 addr - Assembler::kPatchReturnSequenceAddressOffset); | 2384 addr - Assembler::kPatchReturnSequenceAddressOffset); |
| 2385 } | 2385 } |
| 2386 it.next(); | 2386 it.next(); |
| 2387 } | 2387 } |
| (...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3767 { | 3767 { |
| 3768 Locker locker; | 3768 Locker locker; |
| 3769 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3769 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3770 } | 3770 } |
| 3771 } | 3771 } |
| 3772 } | 3772 } |
| 3773 | 3773 |
| 3774 #endif // ENABLE_DEBUGGER_SUPPORT | 3774 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3775 | 3775 |
| 3776 } } // namespace v8::internal | 3776 } } // namespace v8::internal |
| OLD | NEW |