[Lldb-commits] [lldb] r350376 - [lldb] Fix ObjCExceptionRecognizedStackFrame to populate the list of recognized arguments
Kuba Mracek via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 3 16:25:08 PST 2019
Author: kuba.brecka
Date: Thu Jan 3 16:25:08 2019
New Revision: 350376
URL: http://llvm.org/viewvc/llvm-project?rev=350376&view=rev
Log:
[lldb] Fix ObjCExceptionRecognizedStackFrame to populate the list of recognized arguments
Differential Revision: https://reviews.llvm.org/D56027
Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py?rev=350376&r1=350375&r2=350376&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py Thu Jan 3 16:25:08 2019
@@ -34,6 +34,17 @@ class ObjCExceptionsTestCase(TestBase):
'name: "ThrownException" - reason: "SomeReason"',
])
+ target = self.dbg.GetSelectedTarget()
+ thread = target.GetProcess().GetSelectedThread()
+ frame = thread.GetSelectedFrame()
+
+ opts = lldb.SBVariablesOptions()
+ opts.SetIncludeRecognizedArguments(True)
+ variables = frame.GetVariables(opts)
+
+ self.assertEqual(variables.GetSize(), 1)
+ self.assertEqual(variables.GetValueAtIndex(0).name, "exception")
+
lldbutil.run_to_source_breakpoint(self, "// Set break point at this line.", lldb.SBFileSpec("main.mm"), launch_info=launch_info)
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=350376&r1=350375&r2=350376&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Thu Jan 3 16:25:08 2019
@@ -2630,6 +2630,9 @@ class ObjCExceptionRecognizedStackFrame
exception = ValueObjectConstResult::Create(frame_sp.get(), value,
ConstString("exception"));
exception = exception->GetDynamicValue(eDynamicDontRunTarget);
+
+ m_arguments = ValueObjectListSP(new ValueObjectList());
+ m_arguments->Append(exception);
}
ValueObjectSP exception;
More information about the lldb-commits
mailing list