diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/debugger/debugger.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/debugger/debugger.cpp b/src/debugger/debugger.cpp index 9086f40..e642851 100644 --- a/src/debugger/debugger.cpp +++ b/src/debugger/debugger.cpp @@ -1033,16 +1033,26 @@ namespace Hsdbg if (!frame.IsValid()) return fail("no frame selected"); + lldb::SBExpressionOptions options; + options.SetUnwindOnError(true); + options.SetIgnoreBreakpoints(true); + options.SetTryAllThreads(true); + options.SetAutoApplyFixIts(true); + options.SetTimeoutInMicroSeconds(5'000'000); + const std::string text(expression); - lldb::SBValue value = frame.EvaluateExpression(text.c_str()); + lldb::SBValue value = frame.EvaluateExpression(text.c_str(), options); if (lldb::SBError error = value.GetError(); error.Fail()) return fail("{}", message_of(error, "could not evaluate")); + drain_output(); + refresh_frame_data(); + const std::string display = display_of(value); if (display.empty()) - return fail("'{}' has no value", text); + return std::format("{} applied", text); const std::string type = text_or(value.GetDisplayTypeName(), ""); |
