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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 // Restore the code in the break slot. | 383 // Restore the code in the break slot. |
384 ClearDebugBreakAtSlot(); | 384 ClearDebugBreakAtSlot(); |
385 } else { | 385 } else { |
386 // Patch the IC call. | 386 // Patch the IC call. |
387 ClearDebugBreakAtIC(); | 387 ClearDebugBreakAtIC(); |
388 } | 388 } |
389 ASSERT(!IsDebugBreak()); | 389 ASSERT(!IsDebugBreak()); |
390 } | 390 } |
391 | 391 |
392 | 392 |
| 393 bool BreakLocationIterator::IsStepInLocation(Isolate* isolate) { |
| 394 if (RelocInfo::IsConstructCall(rmode())) { |
| 395 return true; |
| 396 } else if (RelocInfo::IsCodeTarget(rmode())) { |
| 397 HandleScope scope(debug_info_->GetIsolate()); |
| 398 Address target = rinfo()->target_address(); |
| 399 Handle<Code> target_code(Code::GetCodeFromTargetAddress(target)); |
| 400 return target_code->is_call_stub() || target_code->is_keyed_call_stub(); |
| 401 } else { |
| 402 return false; |
| 403 } |
| 404 } |
| 405 |
| 406 |
393 void BreakLocationIterator::PrepareStepIn(Isolate* isolate) { | 407 void BreakLocationIterator::PrepareStepIn(Isolate* isolate) { |
394 HandleScope scope(isolate); | 408 HandleScope scope(isolate); |
395 | 409 |
396 // Step in can only be prepared if currently positioned on an IC call, | 410 // Step in can only be prepared if currently positioned on an IC call, |
397 // construct call or CallFunction stub call. | 411 // construct call or CallFunction stub call. |
398 Address target = rinfo()->target_address(); | 412 Address target = rinfo()->target_address(); |
399 Handle<Code> target_code(Code::GetCodeFromTargetAddress(target)); | 413 Handle<Code> target_code(Code::GetCodeFromTargetAddress(target)); |
400 if (target_code->is_call_stub() || target_code->is_keyed_call_stub()) { | 414 if (target_code->is_call_stub() || target_code->is_keyed_call_stub()) { |
401 // Step in through IC call is handled by the runtime system. Therefore make | 415 // Step in through IC call is handled by the runtime system. Therefore make |
402 // sure that the any current IC is cleared and the runtime system is | 416 // sure that the any current IC is cleared and the runtime system is |
(...skipping 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3800 { | 3814 { |
3801 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3815 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
3802 isolate_->debugger()->CallMessageDispatchHandler(); | 3816 isolate_->debugger()->CallMessageDispatchHandler(); |
3803 } | 3817 } |
3804 } | 3818 } |
3805 } | 3819 } |
3806 | 3820 |
3807 #endif // ENABLE_DEBUGGER_SUPPORT | 3821 #endif // ENABLE_DEBUGGER_SUPPORT |
3808 | 3822 |
3809 } } // namespace v8::internal | 3823 } } // namespace v8::internal |
OLD | NEW |