[Lldb-commits] [lldb] Enable LLDB to load large dSYM files. (PR #164471)
Ellis Hoag via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 24 11:52:56 PDT 2025
================
@@ -1697,6 +1701,15 @@ void ObjectFileMachO::ProcessSegmentCommand(
// isn't stored in the abstracted Sections.
m_mach_sections.push_back(sect64);
+ // Make sure we can load sections in mach-o files where some sections cross
+ // a 4GB boundary. llvm::MachO::section_64 have only 32 bit file offsets
+ // for the file offset of the section contents, so we need to track and
+ // sections that overflow and adjust the offsets accordingly.
+ const uint64_t section_file_offset = sect64.offset + section_offset_adjust;
+ const uint64_t end_section_offset = (uint64_t)sect64.offset + sect64.size;
----------------
ellishg wrote:
Do we need to convert `sect64.offset` to `uint64_t`? And if we do, why not do the same on the line before?
```suggestion
const uint64_t section_file_offset = sect64.offset + section_offset_adjust;
const uint64_t end_section_offset = sect64.offset + sect64.size;
```
https://github.com/llvm/llvm-project/pull/164471
More information about the lldb-commits
mailing list