@@ -6528,7 +6528,7 @@ static void AddRegion(const MemoryRegionInfo ®ion, bool try_dirty_pages,
6528
6528
CreateCoreFileMemoryRange (region));
6529
6529
}
6530
6530
6531
- static void AddRegisterSections (Process &process, ThreadSP &thread_sp,
6531
+ static void AddSegmentRegisterSections (Process &process, ThreadSP &thread_sp,
6532
6532
CoreFileMemoryRanges &ranges,
6533
6533
lldb::addr_t range_end) {
6534
6534
lldb::RegisterContextSP reg_ctx = thread_sp->GetRegisterContext ();
@@ -6566,8 +6566,7 @@ static void AddRegisterSections(Process &process, ThreadSP &thread_sp,
6566
6566
AddRegion (register_region, true , ranges);
6567
6567
}
6568
6568
6569
- static void AddModuleSections (Process &process, CoreFileMemoryRanges &ranges,
6570
- std::set<addr_t > &stack_ends) {
6569
+ static void AddLinkMapSections (Process &process, CoreFileMemoryRanges &ranges) {
6571
6570
ModuleList &module_list = process.GetTarget ().GetImages ();
6572
6571
Target *target = &process.GetTarget ();
6573
6572
for (size_t idx = 0 ; idx < module_list.GetSize (); idx++) {
@@ -6588,10 +6587,6 @@ static void AddModuleSections(Process &process, CoreFileMemoryRanges &ranges,
6588
6587
if (err.Fail ())
6589
6588
continue ;
6590
6589
6591
- // We already saved off this truncated stack range.
6592
- if (stack_ends.count (tls_storage_region.GetRange ().GetRangeEnd ()) > 0 )
6593
- continue ;
6594
-
6595
6590
AddRegion (tls_storage_region, true , ranges);
6596
6591
}
6597
6592
}
@@ -6633,7 +6628,7 @@ static void SaveOffRegionsWithStackPointers(Process &process,
6633
6628
// or contains the thread id from thread_sp.
6634
6629
if (core_options.ShouldThreadBeSaved (thread_sp->GetID ())) {
6635
6630
AddRegion (sp_region, try_dirty_pages, ranges);
6636
- AddRegisterSections (process, thread_sp, ranges, range_end);
6631
+ AddSegmentRegisterSections (process, thread_sp, ranges, range_end);
6637
6632
}
6638
6633
}
6639
6634
}
@@ -6747,8 +6742,8 @@ Status Process::CalculateCoreFileSaveRanges(const SaveCoreOptions &options,
6747
6742
options.HasSpecifiedThreads ()) {
6748
6743
SaveOffRegionsWithStackPointers (*this , options, regions, ranges,
6749
6744
stack_ends);
6750
- // Save off the load sections for the TLS data.
6751
- AddModuleSections (*this , ranges, stack_ends );
6745
+ // We need the link map for TLS data.
6746
+ AddLinkMapSections (*this , ranges);
6752
6747
}
6753
6748
6754
6749
switch (core_style) {
0 commit comments