| 90 | } |
| 91 | |
| 92 | std::function<void(const ResultRecord&)> LldbVariable::handlerOfSetFormatCommand() |
| 93 | { |
| 94 | return [guarded_this = QPointer{this}](const ResultRecord& r) { |
| 95 | auto* const variable = guarded_this.get(); |
| 96 | if (variable && r.hasField(rawUpdateField())) { |
| 97 | const auto* const changes = variable->handleRawUpdate(r); |
| 98 | if (changes && !variable->inScope()) { |
| 99 | // MIVariable::handleUpdate() updates value() only if the variable is in scope. But |
| 100 | // LLDB-MI always sends the value in the current format. Thus update value() manually. |
| 101 | variable->setValueToOptionalValueFieldOf(*changes); |
| 102 | } |
| 103 | } |
| 104 | }; |
| 105 | } |
| 106 | |
| 107 | QString LldbVariable::formatValue(const QString& value) const |
| 108 | { |
nothing calls this directly
no test coverage detected