https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/146686
>From 3d19a8f5069e0741a2605829adc291cf6c673eeb Mon Sep 17 00:00:00 2001 From: David Spickett <david.spick...@linaro.org> Date: Wed, 2 Jul 2025 13:06:09 +0000 Subject: [PATCH 1/2] [lldb] Use correct size when dumping DWARF64 DW_FORM_ref_addr Not that we ever do that, because this is unused code, but if someone was debugging lldb I guess they'd call this. Was missed in https://github.com/llvm/llvm-project/pull/145645 Relates to https://github.com/llvm/llvm-project/issues/135208 --- lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp index 2e98e3c33acaf..40e2a9669e258 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -420,8 +420,7 @@ void DWARFFormValue::Dump(Stream &s) const { DumpAddress(s.AsRawOstream(), uvalue, sizeof(uint64_t) * 2); else DumpAddress(s.AsRawOstream(), uvalue, - 4 * 2); // 4 for DWARF32, 8 for DWARF64, but we don't - // support DWARF64 yet + m_unit->GetFormParams().getRefAddrByteSize()); break; } case DW_FORM_ref1: >From 742256db7cc06b81d491ab501db8db31e7fecebd Mon Sep 17 00:00:00 2001 From: David Spickett <david.spick...@linaro.org> Date: Thu, 3 Jul 2025 09:06:43 +0000 Subject: [PATCH 2/2] simplify --- lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp index 40e2a9669e258..650b89eb9be1e 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -416,11 +416,8 @@ void DWARFFormValue::Dump(Stream &s) const { case DW_FORM_ref_addr: { assert(m_unit); // Unit must be valid for DW_FORM_ref_addr objects or we // will get this wrong - if (m_unit->GetVersion() <= 2) - DumpAddress(s.AsRawOstream(), uvalue, sizeof(uint64_t) * 2); - else - DumpAddress(s.AsRawOstream(), uvalue, - m_unit->GetFormParams().getRefAddrByteSize()); + DumpAddress(s.AsRawOstream(), uvalue, + m_unit->GetFormParams().getRefAddrByteSize()); break; } case DW_FORM_ref1: _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits