[lldb] [llvm] [lldb-dap] Add multi-session support with shared debugger instances (PR #163653)
    Walter Erquinigo via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 22 20:05:50 PDT 2025
    
    
  
================
@@ -622,6 +623,30 @@ class Target : public std::enable_shared_from_this<Target>,
   ///     requirements.
   llvm::Error SetLabel(llvm::StringRef label);
 
+  /// Get the target session name for this target.
+  ///
+  /// Provides a meaningful name for IDEs or tools to display for dynamically
+  /// created targets. Defaults to "Session {ID}" based on the globally unique
+  /// ID.
+  ///
+  /// \return
+  ///     The target session name for this target.
+  const std::string &GetTargetSessionName() { return m_target_session_name; }
----------------
walter-erquinigo wrote:
```suggestion
  llvm::StringRef GetTargetSessionName() { return m_target_session_name; }
```
You should use StringRef. It can represent different kinds of strings automatically.
https://github.com/llvm/llvm-project/pull/163653
    
    
More information about the llvm-commits
mailing list