[Lldb-commits] [lldb] [lldb] Fix assert when `target frame-provider register` succeeds (PR #208232)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 8 08:03:06 PDT 2026


================
@@ -0,0 +1,41 @@
+"""
+Test that `target frame-provider register` succeeds without asserting.
+
+CommandObjectTargetFrameProviderRegister::DoExecute never called
+CommandReturnObject::SetStatus() on its success path. CommandObject.cpp
+has a DoExecuteStatusCheck RAII guard that asserts DoExecute always sets a
+status; since AppendMessage()/AppendMessageWithFormatv() don't touch
+status (unlike AppendError()/SetError(), which do), the status stayed
+eReturnStatusInvalid on success, tripping the assert.
+
+This regression went unnoticed because every other scripted_frame_provider
+test calls SBTarget::RegisterScriptedFrameProvider directly, bypassing
+this command entirely.
+"""
+
+import os
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class TestFrameProviderRegisterCommandStatus(TestBase):
----------------
medismailben wrote:

I've been matching the filename for the test class name for too long, so calling this TestCase feels weird to me. I'll stick with this.

https://github.com/llvm/llvm-project/pull/208232


More information about the lldb-commits mailing list