Lines Matching defs:debug_info
114 BreakLocation BreakLocation::FromFrame(Handle<DebugInfo> debug_info,
116 if (debug_info->CanBreakAtEntry()) {
122 BreakIterator it(debug_info);
123 it.SkipTo(BreakIndexFromCodeOffset(debug_info, abstract_code, offset));
128 Handle<DebugInfo> debug_info, std::vector<BreakLocation>& break_locations,
131 debug_info->GetBreakPointCount(isolate_));
137 debug_info, &break_locations[i], &location_has_break_points);
157 Handle<DebugInfo> debug_info, JavaScriptFrame* frame,
159 DCHECK(!debug_info->CanBreakAtEntry());
166 BreakIterator it(debug_info);
167 it.SkipTo(BreakIndexFromCodeOffset(debug_info, abstract_code, offset));
170 for (BreakIterator it(debug_info); !it.Done(); it.Next()) {
188 int BreakLocation::BreakIndexFromCodeOffset(Handle<DebugInfo> debug_info,
195 for (BreakIterator it(debug_info); !it.Done(); it.Next()) {
208 Handle<DebugInfo> debug_info) const {
210 if (!debug_info->HasBreakPoint(isolate, position_)) return false;
211 if (debug_info->CanBreakAtEntry()) {
213 return debug_info->BreakAtEntry();
219 BreakIterator it(debug_info);
241 BreakIterator::BreakIterator(Handle<DebugInfo> debug_info)
242 : debug_info_(debug_info),
245 debug_info->DebugBytecodeArray().SourcePositionTable()) {
246 position_ = debug_info->shared().StartPosition();
456 DebugInfoListNode::DebugInfoListNode(Isolate* isolate, DebugInfo debug_info)
460 debug_info_ = global_handles->Create(debug_info).location();
504 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
507 BreakLocation location = BreakLocation::FromFrame(debug_info, frame);
509 IsBreakOnInstrumentation(debug_info, location);
517 CheckBreakPoints(debug_info, &location, &has_break_points);
532 DCHECK(debug_info->BreakAtEntry());
607 bool Debug::IsBreakOnInstrumentation(Handle<DebugInfo> debug_info,
611 break_points_active_ && location.HasBreakPoint(isolate_, debug_info);
615 debug_info->GetBreakPoints(isolate_, location.position());
639 MaybeHandle<FixedArray> Debug::CheckBreakPoints(Handle<DebugInfo> debug_info,
644 break_points_active_ && location->HasBreakPoint(isolate_, debug_info);
650 return Debug::GetHitBreakPoints(debug_info, location->position(),
677 Handle<DebugInfo> debug_info(function->shared().GetDebugInfo(), isolate_);
681 BreakLocation::AllAtCurrentStatement(debug_info, frame, &break_locations);
682 return CheckBreakPointsForLocations(debug_info, break_locations,
733 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
738 *source_position = FindBreakablePosition(debug_info, *source_position);
739 DebugInfo::SetBreakPoint(isolate_, debug_info, *source_position, break_point);
741 DCHECK_LT(0, debug_info->GetBreakPointCount(isolate_));
743 ClearBreakPoints(debug_info);
744 ApplyBreakPoints(debug_info);
785 int Debug::FindBreakablePosition(Handle<DebugInfo> debug_info,
788 if (debug_info->CanBreakAtEntry()) {
791 DCHECK(debug_info->HasInstrumentedBytecodeArray());
792 BreakIterator it(debug_info);
798 void Debug::ApplyBreakPoints(Handle<DebugInfo> debug_info) {
801 if (debug_info->CanBreakAtEntry()) {
802 debug_info->SetBreakAtEntry();
804 if (!debug_info->HasInstrumentedBytecodeArray()) return;
805 FixedArray break_points = debug_info->break_points();
810 DCHECK(debug_info->HasInstrumentedBytecodeArray());
811 BreakIterator it(debug_info);
816 debug_info->SetDebugExecutionMode(DebugInfo::kBreakpoints);
819 void Debug::ClearBreakPoints(Handle<DebugInfo> debug_info) {
821 if (debug_info->CanBreakAtEntry()) {
822 debug_info->ClearBreakAtEntry();
826 if (!debug_info->HasInstrumentedBytecodeArray() ||
827 !debug_info->HasBreakInfo()) {
832 for (BreakIterator it(debug_info); !it.Done(); it.Next()) {
844 if (!node->debug_info()->HasBreakInfo()) continue;
846 isolate_, node->debug_info(), break_point);
848 Handle<DebugInfo> debug_info = node->debug_info();
849 if (DebugInfo::ClearBreakPoint(isolate_, debug_info, break_point)) {
850 ClearBreakPoints(debug_info);
851 if (debug_info->GetBreakPointCount(isolate_) == 0) {
852 RemoveBreakInfoAndMaybeFree(debug_info);
854 ApplyBreakPoints(debug_info);
864 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
865 int id = debug_info->debugging_id();
868 debug_info->set_debugging_id(id);
992 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
994 DCHECK(debug_info->HasInstrumentedBytecodeArray());
995 for (BreakIterator it(debug_info); !it.Done(); it.Next()) {
1017 MaybeHandle<FixedArray> Debug::GetHitBreakPoints(Handle<DebugInfo> debug_info,
1021 Handle<Object> break_points = debug_info->GetBreakPoints(isolate_, position);
1022 bool is_break_at_entry = debug_info->BreakAtEntry();
1210 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
1211 location = BreakLocation::FromFrame(debug_info, js_frame);
1243 auto* debug_info = wasm_frame->native_module()->GetDebugInfo();
1244 if (debug_info->PrepareStep(wasm_frame)) {
1302 auto* debug_info = wasm_frame->native_module()->GetDebugInfo();
1303 debug_info->PrepareStepOutTo(wasm_frame);
1348 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate);
1349 if (debug_info->GetBreakPointCount(isolate) == 0) {
1353 debug_info->GetBreakPointCount(isolate));
1355 for (int i = 0; i < debug_info->break_points().length(); ++i) {
1356 if (!debug_info->break_points().get(i).IsUndefined(isolate)) {
1358 BreakPointInfo::cast(debug_info->break_points().get(i));
1395 Handle<DebugInfo> debug_info = node->debug_info();
1396 ClearBreakPoints(debug_info);
1397 ApplyBreakPoints(debug_info);
1531 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
1532 if (debug_info->flags(kRelaxedLoad) & DebugInfo::kPreparedForDebugExecution) {
1538 if (debug_info->CanBreakAtEntry()) {
1551 if (debug_info->CanBreakAtEntry()) {
1561 debug_info->set_flags(
1562 debug_info->flags(kRelaxedLoad) | DebugInfo::kPreparedForDebugExecution,
1578 if (current->debug_info()->CanBreakAtEntry()) {
1580 if (current->debug_info()->shared().IsApiFunction()) {
1635 void FindBreakablePositions(Handle<DebugInfo> debug_info, int start_position,
1638 DCHECK(debug_info->HasInstrumentedBytecodeArray());
1639 BreakIterator it(debug_info);
1678 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
1679 FindBreakablePositions(debug_info, start_position, end_position, locations);
1691 Handle<DebugInfo> debug_info(candidate->GetDebugInfo(), isolate_);
1692 FindBreakablePositions(debug_info, start_position, end_position, locations);
1794 Handle<DebugInfo> debug_info(candidate->GetDebugInfo(), isolate_);
1795 const int candidate_position = FindBreakablePosition(debug_info, position);
1949 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
1953 DCHECK(!debug_info->HasBreakInfo());
1959 int flags = debug_info->flags(kRelaxedLoad);
1962 debug_info->set_flags(flags, kRelaxedStore);
1963 debug_info->set_break_points(*break_points);
1974 Handle<DebugInfo> debug_info = isolate_->factory()->NewDebugInfo(shared);
1975 DebugInfoListNode* node = new DebugInfoListNode(isolate_, *debug_info);
1979 return debug_info;
1987 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
1989 DCHECK(!debug_info->HasCoverageInfo());
1991 debug_info->set_flags(
1992 debug_info->flags(kRelaxedLoad) | DebugInfo::kHasCoverageInfo,
1994 debug_info->set_coverage_info(*coverage_info);
2007 void Debug::FindDebugInfo(Handle<DebugInfo> debug_info,
2014 if ((*curr)->debug_info().is_identical_to(debug_info)) return;
2028 Handle<DebugInfo> debug_info = current->debug_info();
2029 clear_function(debug_info);
2030 if (debug_info->IsEmpty()) {
2040 void Debug::RemoveBreakInfoAndMaybeFree(Handle<DebugInfo> debug_info) {
2042 debug_info->ClearBreakInfo(isolate_);
2043 if (debug_info->IsEmpty()) {
2046 FindDebugInfo(debug_info, &prev, &node);
2054 DCHECK(node->debug_info()->IsEmpty());
2065 Handle<DebugInfo> debug_info(node->debug_info());
2066 debug_info->shared().set_script_or_debug_info(debug_info->script(),
2083 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
2084 BreakLocation location = BreakLocation::FromFrame(debug_info, frame);
2305 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
2306 if (!debug_info->computed_debug_is_blackboxed()) {
2325 debug_info->set_debug_is_blackboxed(is_blackboxed);
2326 debug_info->set_computed_debug_is_blackboxed(true);
2328 return debug_info->debug_is_blackboxed();
2500 Handle<DebugInfo> debug_info(function->shared().GetDebugInfo(),
2506 BreakLocation::AllAtCurrentStatement(debug_info, it.frame(),
2510 if (IsBreakOnInstrumentation(debug_info, break_locations[i])) {
2517 break_points = CheckBreakPointsForLocations(debug_info, break_locations,
2641 Handle<DebugInfo> debug_info = current->debug_info();
2642 if (debug_info->HasInstrumentedBytecodeArray() &&
2643 debug_info->DebugExecutionMode() != isolate_->debug_execution_mode()) {
2644 DCHECK(debug_info->shared().HasBytecodeArray());
2646 ClearSideEffectChecks(debug_info);
2647 ApplyBreakPoints(debug_info);
2649 ClearBreakPoints(debug_info);
2650 ApplySideEffectChecks(debug_info);
2710 void Debug::ApplySideEffectChecks(Handle<DebugInfo> debug_info) {
2712 DCHECK(debug_info->HasInstrumentedBytecodeArray());
2713 Handle<BytecodeArray> debug_bytecode(debug_info->DebugBytecodeArray(),
2716 debug_info->SetDebugExecutionMode(DebugInfo::kSideEffects);
2719 void Debug::ClearSideEffectChecks(Handle<DebugInfo> debug_info) {
2721 DCHECK(debug_info->HasInstrumentedBytecodeArray());
2722 Handle<BytecodeArray> debug_bytecode(debug_info->DebugBytecodeArray(),
2724 Handle<BytecodeArray> original(debug_info->OriginalBytecodeArray(), isolate_);
2748 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
2750 debug_info->GetSideEffectState(isolate_);
2769 ApplySideEffectChecks(debug_info);