[Lldb-commits] [lldb] Enable LLDB to load large dSYM files. (PR #164471)
Peter Rong via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 24 11:56:38 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;
----------------
DataCorrupted wrote:
I believe both should be converted.
```suggestion
const uint64_t section_file_offset = (uint64_t)sect64.offset + section_offset_adjust;
const uint64_t end_section_offset = (uint64_t)sect64.offset + sect64.size;
```
https://github.com/llvm/llvm-project/pull/164471
More information about the lldb-commits
mailing list