Skip to content

Commit e00c696

Browse files
committed
[lldb] Make sure Status is updated in GetFrameBaseValue
This fixes the following assertion: "Cannot create Expected<T> from Error success value." The problem was that GetFrameBaseValue return false without updating the Status argument. This patch makes sure that every return path updates the Status if the pointer is valid.
1 parent f2c5aa9 commit e00c696

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/source/Target/StackFrame.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,9 @@ bool StackFrame::GetFrameBaseValue(Scalar &frame_base, Status *error_ptr) {
10841084
if (!m_cfa_is_valid) {
10851085
m_frame_base_error = Status::FromErrorString(
10861086
"No frame base available for this historical stack frame.");
1087-
return false;
1087+
if (error_ptr)
1088+
*error_ptr = m_frame_base_error.Clone();
1089+
return m_frame_base_error.Success();
10881090
}
10891091

10901092
if (m_flags.IsClear(GOT_FRAME_BASE)) {

0 commit comments

Comments
 (0)