[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:52 PDT 2024
================
@@ -46,8 +46,59 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+void SaveCoreOptions::AddThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0)
+ m_threads_to_save.emplace(tid);
+}
+
+bool SaveCoreOptions::RemoveThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0) {
+ m_threads_to_save.erase(tid);
+ return true;
+ }
----------------
clayborg wrote:
FYI this would fail to remove the tid because you have `m_threads_to_save.count(tid) == 0` instead of `m_threads_to_save.count(tid) != 0`, but see the one line replacement code that will work below.
https://github.com/llvm/llvm-project/pull/100443
More information about the lldb-commits
mailing list