| 565 | |
| 566 | |
| 567 | void DebuggerBreakpoints::UnserializedMetadata() |
| 568 | { |
| 569 | Ref<Metadata> metadata = m_state->GetController()->GetData()->QueryMetadata("debugger.breakpoints"); |
| 570 | if (!metadata || (!metadata->IsArray())) |
| 571 | return; |
| 572 | |
| 573 | vector<Ref<Metadata>> array = metadata->GetArray(); |
| 574 | std::vector<ModuleNameAndOffset> newBreakpoints; |
| 575 | |
| 576 | for (auto& element : array) |
| 577 | { |
| 578 | if (!element || (!element->IsKeyValueStore())) |
| 579 | continue; |
| 580 | |
| 581 | std::map<std::string, Ref<Metadata>> info = element->GetKeyValueStore(); |
| 582 | ModuleNameAndOffset address; |
| 583 | |
| 584 | if (!(info["module"] && info["module"]->IsString())) |
| 585 | continue; |
| 586 | |
| 587 | address.module = info["module"]->GetString(); |
| 588 | |
| 589 | if (!(info["offset"] && info["offset"]->IsUnsignedInteger())) |
| 590 | continue; |
| 591 | |
| 592 | address.offset = info["offset"]->GetUnsignedInteger(); |
| 593 | newBreakpoints.push_back(address); |
| 594 | } |
| 595 | |
| 596 | m_breakpoints = newBreakpoints; |
| 597 | } |
| 598 | |
| 599 | |
| 600 | void DebuggerBreakpoints::Apply() |
no test coverage detected