[Lldb-commits] [lldb] [lldb/Target] Unify frame provider descriptor and chain IDs (PR #190712)

via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 7 17:35:46 PDT 2026


================
@@ -83,12 +87,20 @@ struct ScriptedFrameProviderDescriptor {
   /// Check if this descriptor has valid metadata for script-based providers.
   bool IsValid() const { return scripted_metadata_sp != nullptr; }
 
-  /// Get a unique identifier for this descriptor based on its contents.
-  /// The ID is computed from the class name and arguments dictionary,
-  /// not from the pointer address, so two descriptors with the same
-  /// contents will have the same ID.
+  /// Get a unique identifier for this descriptor.
+  /// Returns the monotonically increasing ID assigned by Target if set
+  /// (non-zero), otherwise falls back to the content-based hash from
+  /// ScriptedMetadata.
----------------
jimingham wrote:

When do I need to make a Provider w/o giving it an ID.  The way we do it in other places where we want to give an ID to something that we might not successfully make is to give it an ID, and if it fails, decrement the ID so you won't notice the failure as a hole in the list.

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


More information about the lldb-commits mailing list