[Lldb-commits] [lldb] [lldb] Update the String table offset based on the DWARF format (PR #147054)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 4 07:03:55 PDT 2025
================
@@ -1077,7 +1077,8 @@ uint32_t DWARFUnit::GetHeaderByteSize() const { return m_header.getSize(); }
std::optional<uint64_t>
DWARFUnit::GetStringOffsetSectionItem(uint32_t index) const {
- lldb::offset_t offset = GetStrOffsetsBase() + index * 4;
+ lldb::offset_t offset =
+ GetStrOffsetsBase() + index * m_header.getDwarfOffsetByteSize();
return m_dwarf.GetDWARFContext().getOrLoadStrOffsetsData().GetU32(&offset);
----------------
labath wrote:
GetU32 should probably also change to `GetUnsigned(getDwarfOffsetByteSize())`
https://github.com/llvm/llvm-project/pull/147054
More information about the lldb-commits
mailing list