| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 Handle<SharedFunctionInfo>(JSFunction::cast(frame->function())->shared()); | 1757 Handle<SharedFunctionInfo>(JSFunction::cast(frame->function())->shared()); |
| 1758 if (!EnsureDebugInfo(shared)) { | 1758 if (!EnsureDebugInfo(shared)) { |
| 1759 // Return if we failed to retrieve the debug info. | 1759 // Return if we failed to retrieve the debug info. |
| 1760 return; | 1760 return; |
| 1761 } | 1761 } |
| 1762 Handle<DebugInfo> debug_info = GetDebugInfo(shared); | 1762 Handle<DebugInfo> debug_info = GetDebugInfo(shared); |
| 1763 Handle<Code> code(debug_info->code()); | 1763 Handle<Code> code(debug_info->code()); |
| 1764 Handle<Code> original_code(debug_info->original_code()); | 1764 Handle<Code> original_code(debug_info->original_code()); |
| 1765 #ifdef DEBUG | 1765 #ifdef DEBUG |
| 1766 // Get the code which is actually executing. | 1766 // Get the code which is actually executing. |
| 1767 Handle<Code> frame_code(frame->code()); | 1767 Handle<Code> frame_code(frame->LookupCode(Isolate::Current())); |
| 1768 ASSERT(frame_code.is_identical_to(code)); | 1768 ASSERT(frame_code.is_identical_to(code)); |
| 1769 #endif | 1769 #endif |
| 1770 | 1770 |
| 1771 // Find the call address in the running code. This address holds the call to | 1771 // Find the call address in the running code. This address holds the call to |
| 1772 // either a DebugBreakXXX or to the debug break return entry code if the | 1772 // either a DebugBreakXXX or to the debug break return entry code if the |
| 1773 // break point is still active after processing the break point. | 1773 // break point is still active after processing the break point. |
| 1774 Address addr = frame->pc() - Assembler::kCallTargetAddressOffset; | 1774 Address addr = frame->pc() - Assembler::kCallTargetAddressOffset; |
| 1775 | 1775 |
| 1776 // Check if the location is at JS exit or debug break slot. | 1776 // Check if the location is at JS exit or debug break slot. |
| 1777 bool at_js_return = false; | 1777 bool at_js_return = false; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 Handle<SharedFunctionInfo> shared = | 1839 Handle<SharedFunctionInfo> shared = |
| 1840 Handle<SharedFunctionInfo>(JSFunction::cast(frame->function())->shared()); | 1840 Handle<SharedFunctionInfo>(JSFunction::cast(frame->function())->shared()); |
| 1841 if (!EnsureDebugInfo(shared)) { | 1841 if (!EnsureDebugInfo(shared)) { |
| 1842 // Return if we failed to retrieve the debug info. | 1842 // Return if we failed to retrieve the debug info. |
| 1843 return false; | 1843 return false; |
| 1844 } | 1844 } |
| 1845 Handle<DebugInfo> debug_info = GetDebugInfo(shared); | 1845 Handle<DebugInfo> debug_info = GetDebugInfo(shared); |
| 1846 Handle<Code> code(debug_info->code()); | 1846 Handle<Code> code(debug_info->code()); |
| 1847 #ifdef DEBUG | 1847 #ifdef DEBUG |
| 1848 // Get the code which is actually executing. | 1848 // Get the code which is actually executing. |
| 1849 Handle<Code> frame_code(frame->code()); | 1849 Handle<Code> frame_code(frame->LookupCode(Isolate::Current())); |
| 1850 ASSERT(frame_code.is_identical_to(code)); | 1850 ASSERT(frame_code.is_identical_to(code)); |
| 1851 #endif | 1851 #endif |
| 1852 | 1852 |
| 1853 // Find the call address in the running code. | 1853 // Find the call address in the running code. |
| 1854 Address addr = frame->pc() - Assembler::kCallTargetAddressOffset; | 1854 Address addr = frame->pc() - Assembler::kCallTargetAddressOffset; |
| 1855 | 1855 |
| 1856 // Check if the location is at JS return. | 1856 // Check if the location is at JS return. |
| 1857 RelocIterator it(debug_info->code()); | 1857 RelocIterator it(debug_info->code()); |
| 1858 while (!it.done()) { | 1858 while (!it.done()) { |
| 1859 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { | 1859 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { |
| (...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3150 { | 3150 { |
| 3151 Locker locker; | 3151 Locker locker; |
| 3152 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3152 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3153 } | 3153 } |
| 3154 } | 3154 } |
| 3155 } | 3155 } |
| 3156 | 3156 |
| 3157 #endif // ENABLE_DEBUGGER_SUPPORT | 3157 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3158 | 3158 |
| 3159 } } // namespace v8::internal | 3159 } } // namespace v8::internal |
| OLD | NEW |