Author: Walter Erquinigo Date: 2024-11-01T17:33:08-04:00 New Revision: c1df376b0c8b3edbb6c5ad3fb6ebf39e75b5ad88
URL: https://github.com/llvm/llvm-project/commit/c1df376b0c8b3edbb6c5ad3fb6ebf39e75b5ad88 DIFF: https://github.com/llvm/llvm-project/commit/c1df376b0c8b3edbb6c5ad3fb6ebf39e75b5ad88.diff LOG: [LLDB] Finish implementing support for DW_FORM_data16 (#113508) 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. Added: Modified: lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp lldb/test/Shell/SymbolFile/DWARF/x86/DW_AT_const_value.s Removed: ################################################################################ diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp index f58c6262349c6f..404e50d57a9251 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: diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_AT_const_value.s b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_AT_const_value.s index 720684c19beebc..306afd32d92235 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_AT_const_value.s +++ b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_AT_const_value.s @@ -4,6 +4,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux %s -o %t # RUN: %lldb %t \ # RUN: -o "target variable udata data1 data2 data4 data8 string strp ref4 udata_ptr" \ +# RUN: -o "target variable --format x data16" \ # RUN: -o exit | FileCheck %s # CHECK-LABEL: target variable @@ -22,6 +23,8 @@ # CHECK: (char[7]) ref4 = <empty constant data> ## A variable of pointer type. # CHECK: (unsigned long *) udata_ptr = 0xdeadbeefbaadf00d +# CHECK: (unsigned __int128) data16 = 0xdeadbeefbaadf00ddeadbeefbaadf00d + .section .debug_abbrev,"",@progbits .byte 1 # Abbreviation Code @@ -88,6 +91,7 @@ var 15, 0x8 # DW_FORM_string var 16, 0xe # DW_FORM_strp var 17, 0x13 # DW_FORM_ref4 + var 18, 0x1e # DW_FORM_data16 .byte 0 # EOM(3) .section .debug_info,"",@progbits .Lcu_begin0: @@ -119,6 +123,11 @@ .Lulong_ptr: .byte 2 # Abbrev DW_TAG_pointer_type .long .Lulong-.Lcu_begin0 # DW_AT_type +.Lu128: + .byte 6 # Abbrev DW_TAG_base_type + .asciz "Lu128" # DW_AT_name + .byte 16 # DW_AT_byte_size + .byte 7 # DW_AT_encoding .byte 10 # Abbrev DW_TAG_variable .asciz "udata" # DW_AT_name @@ -165,6 +174,12 @@ .long .Lulong_ptr-.Lcu_begin0 # DW_AT_type .uleb128 0xdeadbeefbaadf00d # DW_AT_const_value + .byte 18 # Abbrev DW_TAG_variable + .asciz "data16" # DW_AT_name + .long .Lu128-.Lcu_begin0 # DW_AT_type + .quad 0xdeadbeefbaadf00d # DW_AT_const_value + .quad 0xdeadbeefbaadf00d # DW_AT_const_value + .byte 0 # End Of Children Mark .Ldebug_info_end0: _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits