[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
Fri Jul 26 11:27:20 PDT 2024
================
@@ -6621,29 +6624,28 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP &process_sp,
LC_THREAD_data.SetAddressByteSize(addr_byte_size);
LC_THREAD_data.SetByteOrder(byte_order);
}
- for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {
- ThreadSP thread_sp(thread_list.GetThreadAtIndex(thread_idx));
----------------
clayborg wrote:
we need to revert this change back as we need a zero based thread index into `LC_THREAD_datas`:
```
for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {
ThreadSP thread_sp = thread_list[thread_idx];
```
We don't want to use `for (const ThreadSP &thread_sp : thread_list) {` anymore because we need the index for the `thread_sp` within `thread_list`
https://github.com/llvm/llvm-project/pull/100443
More information about the lldb-commits
mailing list