[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 24 12:31:51 PDT 2024


================
@@ -53,6 +53,30 @@ class LLDB_API SBSaveCoreOptions {
   /// \return The output file spec.
   SBFileSpec GetOutputFile() const;
 
+  /// Add a thread to save in the core file.
+  ///
+  /// \param thread_id The thread ID to save.
+  void AddThread(lldb::tid_t thread_id);
----------------
clayborg wrote:

Do we want to do things by `lldb::tid_t` or do we want to pass in a `lldb::SBThread`? The reason I mention this is there are two integer identifiers from a SBThread:
```
  lldb::tid_t lldb::SBThread::GetThreadID() const;
  uint32_t lldb::SBThread::GetIndexID() const;
```
This API could and probably should be:
```
void AddThread(lldb::SBThread thread);
```
Because in order to get a lldb::tid_t users would need to have a SBThread already anyway. Then the user can't mess up by specifying the wrong ID (index ID instead of `lldb::tid_t`)

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


More information about the lldb-commits mailing list