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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Iterate through reloc info for code and original code stopping at each | 89 // Iterate through reloc info for code and original code stopping at each |
90 // breakable code target. | 90 // breakable code target. |
91 bool first = break_point_ == -1; | 91 bool first = break_point_ == -1; |
92 while (!RinfoDone()) { | 92 while (!RinfoDone()) { |
93 if (!first) RinfoNext(); | 93 if (!first) RinfoNext(); |
94 first = false; | 94 first = false; |
95 if (RinfoDone()) return; | 95 if (RinfoDone()) return; |
96 | 96 |
97 // Whenever a statement position or (plain) position is passed update the | 97 // Whenever a statement position or (plain) position is passed update the |
98 // current value of these. | 98 // current value of these. |
99 if (is_position(rmode())) { | 99 if (RelocInfo::IsPosition(rmode())) { |
100 if (is_statement_position(rmode())) { | 100 if (RelocInfo::IsStatementPosition(rmode())) { |
101 statement_position_ = | 101 statement_position_ = |
102 rinfo()->data() - debug_info_->shared()->start_position(); | 102 rinfo()->data() - debug_info_->shared()->start_position(); |
103 } | 103 } |
104 // Always update the position as we don't want that to be before the | 104 // Always update the position as we don't want that to be before the |
105 // statement position. | 105 // statement position. |
106 position_ = rinfo()->data() - debug_info_->shared()->start_position(); | 106 position_ = rinfo()->data() - debug_info_->shared()->start_position(); |
107 ASSERT(position_ >= 0); | 107 ASSERT(position_ >= 0); |
108 ASSERT(statement_position_ >= 0); | 108 ASSERT(statement_position_ >= 0); |
109 } | 109 } |
110 | 110 |
111 // Check for breakable code target. Look in the original code as setting | 111 // Check for breakable code target. Look in the original code as setting |
112 // break points can cause the code targets in the running (debugged) code to | 112 // break points can cause the code targets in the running (debugged) code to |
113 // be of a different kind than in the original code. | 113 // be of a different kind than in the original code. |
114 if (is_code_target(rmode())) { | 114 if (RelocInfo::IsCodeTarget(rmode())) { |
115 Address target = original_rinfo()->target_address(); | 115 Address target = original_rinfo()->target_address(); |
116 Code* code = Debug::GetCodeTarget(target); | 116 Code* code = Debug::GetCodeTarget(target); |
117 if (code->is_inline_cache_stub() || is_js_construct_call(rmode())) { | 117 if (code->is_inline_cache_stub() || RelocInfo::IsConstructCall(rmode())) { |
118 break_point_++; | 118 break_point_++; |
119 return; | 119 return; |
120 } | 120 } |
121 if (code->kind() == Code::STUB) { | 121 if (code->kind() == Code::STUB) { |
122 if (type_ == ALL_BREAK_LOCATIONS) { | 122 if (type_ == ALL_BREAK_LOCATIONS) { |
123 if (Debug::IsBreakStub(code)) { | 123 if (Debug::IsBreakStub(code)) { |
124 break_point_++; | 124 break_point_++; |
125 return; | 125 return; |
126 } | 126 } |
127 } else { | 127 } else { |
128 ASSERT(type_ == SOURCE_BREAK_LOCATIONS); | 128 ASSERT(type_ == SOURCE_BREAK_LOCATIONS); |
129 if (Debug::IsSourceBreakStub(code)) { | 129 if (Debug::IsSourceBreakStub(code)) { |
130 break_point_++; | 130 break_point_++; |
131 return; | 131 return; |
132 } | 132 } |
133 } | 133 } |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 // Check for break at return. | 137 // Check for break at return. |
138 // Currently is_exit_js_frame is used on ARM. | 138 if (RelocInfo::IsJSReturn(rmode())) { |
139 if (is_js_return(rmode()) || is_exit_js_frame(rmode())) { | |
140 // Set the positions to the end of the function. | 139 // Set the positions to the end of the function. |
141 if (debug_info_->shared()->HasSourceCode()) { | 140 if (debug_info_->shared()->HasSourceCode()) { |
142 position_ = debug_info_->shared()->end_position() - | 141 position_ = debug_info_->shared()->end_position() - |
143 debug_info_->shared()->start_position(); | 142 debug_info_->shared()->start_position(); |
144 } else { | 143 } else { |
145 position_ = 0; | 144 position_ = 0; |
146 } | 145 } |
147 statement_position_ = position_; | 146 statement_position_ = position_; |
148 break_point_++; | 147 break_point_++; |
149 return; | 148 return; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 277 |
279 void BreakLocationIterator::SetDebugBreak() { | 278 void BreakLocationIterator::SetDebugBreak() { |
280 // If there is already a break point here just return. This might happen if | 279 // If there is already a break point here just return. This might happen if |
281 // the same code is flooded with break points twice. Flooding the same | 280 // the same code is flooded with break points twice. Flooding the same |
282 // function twice might happen when stepping in a function with an exception | 281 // function twice might happen when stepping in a function with an exception |
283 // handler as the handler and the function is the same. | 282 // handler as the handler and the function is the same. |
284 if (IsDebugBreak()) { | 283 if (IsDebugBreak()) { |
285 return; | 284 return; |
286 } | 285 } |
287 | 286 |
288 if (is_js_return(rmode())) { | 287 if (RelocInfo::IsJSReturn(rmode())) { |
289 // This path is currently only used on IA32 as JSExitFrame on ARM uses a | 288 // This path is currently only used on IA32 as JSExitFrame on ARM uses a |
290 // stub. | 289 // stub. |
291 // Patch the JS frame exit code with a debug break call. See | 290 // Patch the JS frame exit code with a debug break call. See |
292 // VisitReturnStatement and ExitJSFrame in codegen-ia32.cc for the | 291 // VisitReturnStatement and ExitJSFrame in codegen-ia32.cc for the |
293 // precise return instructions sequence. | 292 // precise return instructions sequence. |
294 ASSERT(Debug::kIa32JSReturnSequenceLength >= | 293 ASSERT(Debug::kIa32JSReturnSequenceLength >= |
295 Debug::kIa32CallInstructionLength); | 294 Debug::kIa32CallInstructionLength); |
296 rinfo()->patch_code_with_call(Debug::debug_break_return_entry()->entry(), | 295 rinfo()->patch_code_with_call(Debug::debug_break_return_entry()->entry(), |
297 Debug::kIa32JSReturnSequenceLength - Debug::kIa32CallInstructionLength); | 296 Debug::kIa32JSReturnSequenceLength - Debug::kIa32CallInstructionLength); |
298 } else { | 297 } else { |
299 // Patch the original code with the current address as the current address | 298 // Patch the original code with the current address as the current address |
300 // might have changed by the inline caching since the code was copied. | 299 // might have changed by the inline caching since the code was copied. |
301 original_rinfo()->set_target_address(rinfo()->target_address()); | 300 original_rinfo()->set_target_address(rinfo()->target_address()); |
302 | 301 |
303 // Patch the code to invoke the builtin debug break function matching the | 302 // Patch the code to invoke the builtin debug break function matching the |
304 // calling convention used by the call site. | 303 // calling convention used by the call site. |
305 Handle<Code> dbgbrk_code(Debug::FindDebugBreak(rinfo())); | 304 Handle<Code> dbgbrk_code(Debug::FindDebugBreak(rinfo())); |
306 rinfo()->set_target_address(dbgbrk_code->entry()); | 305 rinfo()->set_target_address(dbgbrk_code->entry()); |
307 } | 306 } |
308 ASSERT(IsDebugBreak()); | 307 ASSERT(IsDebugBreak()); |
309 } | 308 } |
310 | 309 |
311 | 310 |
312 void BreakLocationIterator::ClearDebugBreak() { | 311 void BreakLocationIterator::ClearDebugBreak() { |
313 if (is_js_return(rmode())) { | 312 if (RelocInfo::IsJSReturn(rmode())) { |
314 // Restore the JS frame exit code. | 313 // Restore the JS frame exit code. |
315 rinfo()->patch_code(original_rinfo()->pc(), | 314 rinfo()->patch_code(original_rinfo()->pc(), |
316 Debug::kIa32JSReturnSequenceLength); | 315 Debug::kIa32JSReturnSequenceLength); |
317 } else { | 316 } else { |
318 // Patch the code to the original invoke. | 317 // Patch the code to the original invoke. |
319 rinfo()->set_target_address(original_rinfo()->target_address()); | 318 rinfo()->set_target_address(original_rinfo()->target_address()); |
320 } | 319 } |
321 ASSERT(!IsDebugBreak()); | 320 ASSERT(!IsDebugBreak()); |
322 } | 321 } |
323 | 322 |
(...skipping 10 matching lines...) Expand all Loading... |
334 // the call in the original code as it is the code there that will be | 333 // the call in the original code as it is the code there that will be |
335 // executed in place of the debug break call. | 334 // executed in place of the debug break call. |
336 Handle<Code> stub = ComputeCallDebugPrepareStepIn(code->arguments_count()); | 335 Handle<Code> stub = ComputeCallDebugPrepareStepIn(code->arguments_count()); |
337 if (IsDebugBreak()) { | 336 if (IsDebugBreak()) { |
338 original_rinfo()->set_target_address(stub->entry()); | 337 original_rinfo()->set_target_address(stub->entry()); |
339 } else { | 338 } else { |
340 rinfo()->set_target_address(stub->entry()); | 339 rinfo()->set_target_address(stub->entry()); |
341 } | 340 } |
342 } else { | 341 } else { |
343 // Step in through constructs call requires no changes to the running code. | 342 // Step in through constructs call requires no changes to the running code. |
344 ASSERT(is_js_construct_call(rmode())); | 343 ASSERT(RelocInfo::IsConstructCall(rmode())); |
345 } | 344 } |
346 } | 345 } |
347 | 346 |
348 | 347 |
349 // Check whether the break point is at a position which will exit the function. | 348 // Check whether the break point is at a position which will exit the function. |
350 bool BreakLocationIterator::IsExit() const { | 349 bool BreakLocationIterator::IsExit() const { |
351 // Currently is_exit_js_frame is used on ARM. | 350 return (RelocInfo::IsJSReturn(rmode())); |
352 return (is_js_return(rmode()) || is_exit_js_frame(rmode())); | |
353 } | 351 } |
354 | 352 |
355 | 353 |
356 bool BreakLocationIterator::HasBreakPoint() { | 354 bool BreakLocationIterator::HasBreakPoint() { |
357 return debug_info_->HasBreakPoint(code_position()); | 355 return debug_info_->HasBreakPoint(code_position()); |
358 } | 356 } |
359 | 357 |
360 | 358 |
361 // Check whether there is a debug break at the current position. | 359 // Check whether there is a debug break at the current position. |
362 bool BreakLocationIterator::IsDebugBreak() { | 360 bool BreakLocationIterator::IsDebugBreak() { |
363 if (is_js_return(rmode())) { | 361 if (RelocInfo::IsJSReturn(rmode())) { |
364 // This is IA32 specific but works as long as the ARM version | 362 // This is IA32 specific but works as long as the ARM version |
365 // still uses a stub for JSExitFrame. | 363 // still uses a stub for JSExitFrame. |
366 // | 364 // |
367 // TODO(1240753): Make the test architecture independent or split | 365 // TODO(1240753): Make the test architecture independent or split |
368 // parts of the debugger into architecture dependent files. | 366 // parts of the debugger into architecture dependent files. |
369 return (*(rinfo()->pc()) == 0xE8); | 367 return (*(rinfo()->pc()) == 0xE8); |
370 } else { | 368 } else { |
371 return Debug::IsDebugBreak(rinfo()->target_address()); | 369 return Debug::IsDebugBreak(rinfo()->target_address()); |
372 } | 370 } |
373 } | 371 } |
(...skipping 22 matching lines...) Expand all Loading... |
396 } | 394 } |
397 | 395 |
398 | 396 |
399 bool Debug::has_break_points_ = false; | 397 bool Debug::has_break_points_ = false; |
400 DebugInfoListNode* Debug::debug_info_list_ = NULL; | 398 DebugInfoListNode* Debug::debug_info_list_ = NULL; |
401 | 399 |
402 | 400 |
403 // Threading support. | 401 // Threading support. |
404 void Debug::ThreadInit() { | 402 void Debug::ThreadInit() { |
405 thread_local_.last_step_action_ = StepNone; | 403 thread_local_.last_step_action_ = StepNone; |
406 thread_local_.last_statement_position_ = kNoPosition; | 404 thread_local_.last_statement_position_ = RelocInfo::kNoPosition; |
407 thread_local_.step_count_ = 0; | 405 thread_local_.step_count_ = 0; |
408 thread_local_.last_fp_ = 0; | 406 thread_local_.last_fp_ = 0; |
409 thread_local_.step_into_fp_ = 0; | 407 thread_local_.step_into_fp_ = 0; |
410 thread_local_.after_break_target_ = 0; | 408 thread_local_.after_break_target_ = 0; |
411 } | 409 } |
412 | 410 |
413 | 411 |
414 JSCallerSavedBuffer Debug::registers_; | 412 JSCallerSavedBuffer Debug::registers_; |
415 Debug::ThreadLocal Debug::thread_local_; | 413 Debug::ThreadLocal Debug::thread_local_; |
416 | 414 |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 return; | 912 return; |
915 } | 913 } |
916 Handle<DebugInfo> debug_info = GetDebugInfo(shared); | 914 Handle<DebugInfo> debug_info = GetDebugInfo(shared); |
917 | 915 |
918 // Find the break location where execution has stopped. | 916 // Find the break location where execution has stopped. |
919 BreakLocationIterator it(debug_info, ALL_BREAK_LOCATIONS); | 917 BreakLocationIterator it(debug_info, ALL_BREAK_LOCATIONS); |
920 it.FindBreakLocationFromAddress(frame->pc()); | 918 it.FindBreakLocationFromAddress(frame->pc()); |
921 | 919 |
922 // Compute whether or not the target is a call target. | 920 // Compute whether or not the target is a call target. |
923 bool is_call_target = false; | 921 bool is_call_target = false; |
924 if (is_code_target(it.rinfo()->rmode())) { | 922 if (RelocInfo::IsCodeTarget(it.rinfo()->rmode())) { |
925 Address target = it.rinfo()->target_address(); | 923 Address target = it.rinfo()->target_address(); |
926 Code* code = Debug::GetCodeTarget(target); | 924 Code* code = Debug::GetCodeTarget(target); |
927 if (code->is_call_stub()) is_call_target = true; | 925 if (code->is_call_stub()) is_call_target = true; |
928 } | 926 } |
929 | 927 |
930 // If this is the last break code target step out is the only possibility. | 928 // If this is the last break code target step out is the only possibility. |
931 if (it.IsExit() || step_action == StepOut) { | 929 if (it.IsExit() || step_action == StepOut) { |
932 // Step out: If there is a JavaScript caller frame, we need to | 930 // Step out: If there is a JavaScript caller frame, we need to |
933 // flood it with breakpoints. | 931 // flood it with breakpoints. |
934 frames_it.Advance(); | 932 frames_it.Advance(); |
935 if (!frames_it.done()) { | 933 if (!frames_it.done()) { |
936 // Fill the function to return to with one-shot break points. | 934 // Fill the function to return to with one-shot break points. |
937 JSFunction* function = JSFunction::cast(frames_it.frame()->function()); | 935 JSFunction* function = JSFunction::cast(frames_it.frame()->function()); |
938 FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared())); | 936 FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared())); |
939 } | 937 } |
940 } else if (!(is_call_target || is_js_construct_call(it.rmode())) || | 938 } else if (!(is_call_target || RelocInfo::IsConstructCall(it.rmode())) || |
941 step_action == StepNext || step_action == StepMin) { | 939 step_action == StepNext || step_action == StepMin) { |
942 // Step next or step min. | 940 // Step next or step min. |
943 | 941 |
944 // Fill the current function with one-shot break points. | 942 // Fill the current function with one-shot break points. |
945 FloodWithOneShot(shared); | 943 FloodWithOneShot(shared); |
946 | 944 |
947 // Remember source position and frame to handle step next. | 945 // Remember source position and frame to handle step next. |
948 thread_local_.last_statement_position_ = | 946 thread_local_.last_statement_position_ = |
949 debug_info->code()->SourceStatementPosition(frame->pc()); | 947 debug_info->code()->SourceStatementPosition(frame->pc()); |
950 thread_local_.last_fp_ = frame->fp(); | 948 thread_local_.last_fp_ = frame->fp(); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 CodeStub::Major major_key = code->major_key(); | 1008 CodeStub::Major major_key = code->major_key(); |
1011 return major_key == CodeStub::CallFunction || | 1009 return major_key == CodeStub::CallFunction || |
1012 major_key == CodeStub::StackCheck; | 1010 major_key == CodeStub::StackCheck; |
1013 } | 1011 } |
1014 | 1012 |
1015 | 1013 |
1016 // Find the builtin to use for invoking the debug break | 1014 // Find the builtin to use for invoking the debug break |
1017 Handle<Code> Debug::FindDebugBreak(RelocInfo* rinfo) { | 1015 Handle<Code> Debug::FindDebugBreak(RelocInfo* rinfo) { |
1018 // Find the builtin debug break function matching the calling convention | 1016 // Find the builtin debug break function matching the calling convention |
1019 // used by the call site. | 1017 // used by the call site. |
1020 RelocMode mode = rinfo->rmode(); | 1018 RelocInfo::Mode mode = rinfo->rmode(); |
1021 | 1019 |
1022 if (is_code_target(mode)) { | 1020 if (RelocInfo::IsCodeTarget(mode)) { |
1023 Address target = rinfo->target_address(); | 1021 Address target = rinfo->target_address(); |
1024 Code* code = Debug::GetCodeTarget(target); | 1022 Code* code = Debug::GetCodeTarget(target); |
1025 if (code->is_inline_cache_stub()) { | 1023 if (code->is_inline_cache_stub()) { |
1026 if (code->is_call_stub()) { | 1024 if (code->is_call_stub()) { |
1027 return ComputeCallDebugBreak(code->arguments_count()); | 1025 return ComputeCallDebugBreak(code->arguments_count()); |
1028 } | 1026 } |
1029 if (code->is_load_stub()) { | 1027 if (code->is_load_stub()) { |
1030 return Handle<Code>(Builtins::builtin(Builtins::LoadIC_DebugBreak)); | 1028 return Handle<Code>(Builtins::builtin(Builtins::LoadIC_DebugBreak)); |
1031 } | 1029 } |
1032 if (code->is_store_stub()) { | 1030 if (code->is_store_stub()) { |
1033 return Handle<Code>(Builtins::builtin(Builtins::StoreIC_DebugBreak)); | 1031 return Handle<Code>(Builtins::builtin(Builtins::StoreIC_DebugBreak)); |
1034 } | 1032 } |
1035 if (code->is_keyed_load_stub()) { | 1033 if (code->is_keyed_load_stub()) { |
1036 Handle<Code> result = | 1034 Handle<Code> result = |
1037 Handle<Code>(Builtins::builtin(Builtins::KeyedLoadIC_DebugBreak)); | 1035 Handle<Code>(Builtins::builtin(Builtins::KeyedLoadIC_DebugBreak)); |
1038 return result; | 1036 return result; |
1039 } | 1037 } |
1040 if (code->is_keyed_store_stub()) { | 1038 if (code->is_keyed_store_stub()) { |
1041 Handle<Code> result = | 1039 Handle<Code> result = |
1042 Handle<Code>(Builtins::builtin(Builtins::KeyedStoreIC_DebugBreak)); | 1040 Handle<Code>(Builtins::builtin(Builtins::KeyedStoreIC_DebugBreak)); |
1043 return result; | 1041 return result; |
1044 } | 1042 } |
1045 } | 1043 } |
1046 if (is_js_construct_call(mode)) { | 1044 if (RelocInfo::IsConstructCall(mode)) { |
1047 Handle<Code> result = | 1045 Handle<Code> result = |
1048 Handle<Code>(Builtins::builtin(Builtins::ConstructCall_DebugBreak)); | 1046 Handle<Code>(Builtins::builtin(Builtins::ConstructCall_DebugBreak)); |
1049 return result; | 1047 return result; |
1050 } | 1048 } |
1051 // Currently is_exit_js_frame is used on ARM. | |
1052 if (is_exit_js_frame(mode)) { | |
1053 return Handle<Code>(Builtins::builtin(Builtins::Return_DebugBreak)); | |
1054 } | |
1055 if (code->kind() == Code::STUB) { | 1049 if (code->kind() == Code::STUB) { |
1056 ASSERT(code->major_key() == CodeStub::CallFunction || | 1050 ASSERT(code->major_key() == CodeStub::CallFunction || |
1057 code->major_key() == CodeStub::StackCheck); | 1051 code->major_key() == CodeStub::StackCheck); |
1058 Handle<Code> result = | 1052 Handle<Code> result = |
1059 Handle<Code>(Builtins::builtin(Builtins::StubNoRegisters_DebugBreak)); | 1053 Handle<Code>(Builtins::builtin(Builtins::StubNoRegisters_DebugBreak)); |
1060 return result; | 1054 return result; |
1061 } | 1055 } |
1062 } | 1056 } |
1063 | 1057 |
1064 UNREACHABLE(); | 1058 UNREACHABLE(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 } | 1119 } |
1126 | 1120 |
1127 | 1121 |
1128 void Debug::ClearStepIn() { | 1122 void Debug::ClearStepIn() { |
1129 thread_local_.step_into_fp_ = 0; | 1123 thread_local_.step_into_fp_ = 0; |
1130 } | 1124 } |
1131 | 1125 |
1132 | 1126 |
1133 void Debug::ClearStepNext() { | 1127 void Debug::ClearStepNext() { |
1134 thread_local_.last_step_action_ = StepNone; | 1128 thread_local_.last_step_action_ = StepNone; |
1135 thread_local_.last_statement_position_ = kNoPosition; | 1129 thread_local_.last_statement_position_ = RelocInfo::kNoPosition; |
1136 thread_local_.last_fp_ = 0; | 1130 thread_local_.last_fp_ = 0; |
1137 } | 1131 } |
1138 | 1132 |
1139 | 1133 |
1140 bool Debug::EnsureCompiled(Handle<SharedFunctionInfo> shared) { | 1134 bool Debug::EnsureCompiled(Handle<SharedFunctionInfo> shared) { |
1141 if (shared->is_compiled()) return true; | 1135 if (shared->is_compiled()) return true; |
1142 return CompileLazyShared(shared, CLEAR_EXCEPTION); | 1136 return CompileLazyShared(shared, CLEAR_EXCEPTION); |
1143 } | 1137 } |
1144 | 1138 |
1145 | 1139 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 | 1209 |
1216 // Find the call address in the running code. This address holds the call to | 1210 // Find the call address in the running code. This address holds the call to |
1217 // either a DebugBreakXXX or to the debug break return entry code if the | 1211 // either a DebugBreakXXX or to the debug break return entry code if the |
1218 // break point is still active after processing the break point. | 1212 // break point is still active after processing the break point. |
1219 Address addr = frame->pc() - Assembler::kTargetAddrToReturnAddrDist; | 1213 Address addr = frame->pc() - Assembler::kTargetAddrToReturnAddrDist; |
1220 | 1214 |
1221 // Check if the location is at JS exit. | 1215 // Check if the location is at JS exit. |
1222 bool at_js_exit = false; | 1216 bool at_js_exit = false; |
1223 RelocIterator it(debug_info->code()); | 1217 RelocIterator it(debug_info->code()); |
1224 while (!it.done()) { | 1218 while (!it.done()) { |
1225 if (is_js_return(it.rinfo()->rmode())) { | 1219 if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) { |
1226 at_js_exit = it.rinfo()->pc() == addr - 1; | 1220 at_js_exit = it.rinfo()->pc() == addr - 1; |
1227 } | 1221 } |
1228 it.next(); | 1222 it.next(); |
1229 } | 1223 } |
1230 | 1224 |
1231 // Handle the jump to continue execution after break point depending on the | 1225 // Handle the jump to continue execution after break point depending on the |
1232 // break location. | 1226 // break location. |
1233 if (at_js_exit) { | 1227 if (at_js_exit) { |
1234 // First check if the call in the code is still the debug break return | 1228 // First check if the call in the code is still the debug break return |
1235 // entry code. If it is the break point is still active. If not the break | 1229 // entry code. If it is the break point is still active. If not the break |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1971 } | 1965 } |
1972 | 1966 |
1973 | 1967 |
1974 void LockingMessageQueue::Clear() { | 1968 void LockingMessageQueue::Clear() { |
1975 ScopedLock sl(lock_); | 1969 ScopedLock sl(lock_); |
1976 queue_.Clear(); | 1970 queue_.Clear(); |
1977 } | 1971 } |
1978 | 1972 |
1979 | 1973 |
1980 } } // namespace v8::internal | 1974 } } // namespace v8::internal |
OLD | NEW |