[Lldb-commits] [lldb] [LLDB] Fix implementing support for DW_FORM_data16 (PR #106799)
Walter Erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 30 14:18:24 PDT 2024
https://github.com/walter-erquinigo created https://github.com/llvm/llvm-project/pull/106799
This FORM already has support within LLDB to be parsed as a 16-byte
BLOCK, and all that is left to properly support it in the DWARFParser is
to add it to some enums.
With this, I can debug programs that use libstdc++.so.6.0.33 built with
GCC.
Sadly, I haven't figured out a good way to test this.
>From 07ca931aac5fd6e777fbf57b9a838fa6e500160b Mon Sep 17 00:00:00 2001
From: Walter Erquinigo <walter at modular.com>
Date: Fri, 30 Aug 2024 21:14:43 +0000
Subject: [PATCH] [LLDB] Fix implementing support for DW_FORM_data16
This FORM already has support within LLDB to be parsed as a 16-byte
BLOCK, and all that is left to properly support it in the DWARFParser is
to add it to some enums.
With this, I can debug programs that use libstdc++.so.6.0.33 built with
GCC.
Sadly, I haven't figured out a good way to test this.
---
lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
index e1f73f1997e369..e1fcbda469f16d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
@@ -306,6 +306,11 @@ bool DWARFFormValue::SkipValue(dw_form_t form,
*offset_ptr += 8;
return true;
+ // 16 byte values
+ case DW_FORM_data16:
+ *offset_ptr += 16;
+ return true;
+
// signed or unsigned LEB 128 values
case DW_FORM_addrx:
case DW_FORM_loclistx:
@@ -578,6 +583,7 @@ bool DWARFFormValue::IsBlockForm(const dw_form_t form) {
case DW_FORM_block1:
case DW_FORM_block2:
case DW_FORM_block4:
+ case DW_FORM_data16:
return true;
default:
return false;
@@ -611,6 +617,7 @@ bool DWARFFormValue::FormIsSupported(dw_form_t form) {
case DW_FORM_data2:
case DW_FORM_data4:
case DW_FORM_data8:
+ case DW_FORM_data16:
case DW_FORM_string:
case DW_FORM_block:
case DW_FORM_block1:
More information about the lldb-commits
mailing list