Skip to content

Commit

Permalink
LLDB: properly handle step return failures
Browse files Browse the repository at this point in the history
  • Loading branch information
xusheng6 committed Dec 8, 2022
1 parent 594c90e commit 99eab0d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/adapters/lldbadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,17 @@ DebugStopReason LldbAdapter::StepReturn()
// return DebugStopReason::InternalError;
// }
//#else
InvokeBackendCommand("finish");
auto result = InvokeBackendCommand("finish");
if (result.rfind("error: ", 0) == 0)
{
DebuggerEvent event;
event.type = ErrorEventType;
event.data.errorData.shortError = "Step return failed";
event.data.errorData.error = fmt::format("LLDB: step return failed, {}", result);
PostDebuggerEvent(event);
return DebugStopReason::InternalError;
}

//#endif
return StopReason();
}
Expand Down

0 comments on commit 99eab0d

Please sign in to comment.