================
@@ -2408,3 +2410,55 @@ lldb::SBMutex SBTarget::GetAPIMutex() const {
     return lldb::SBMutex(target_sp);
   return lldb::SBMutex();
 }
+
+lldb::SBError
+SBTarget::RegisterScriptedFrameProvider(const char *class_name,
+                                        lldb::SBStructuredData args_dict) {
+  LLDB_INSTRUMENT_VA(this, class_name, args_dict);
+
+  SBError error;
+  TargetSP target_sp = GetSP();
+  if (!target_sp) {
+    error.SetErrorString("invalid target");
+    return error;
+  }
+
+  if (!class_name || !class_name[0]) {
+    error.SetErrorString("invalid class name");
+    return error;
+  }
+
+  // Extract the dictionary from SBStructuredData
+  StructuredData::DictionarySP dict_sp;
----------------
jimingham wrote:

If you are passed a valid non-empty SBStructuredData that is NOT a dictionary, 
you should return an error.  It would be better to tell developers about what 
is obviously a mistake when they are registering the provider.

https://github.com/llvm/llvm-project/pull/161870
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to