[llvm][DebugInfo] Bump DWARFContext maximum DWARF version - #183838
Conversation
In order to start testing DWARFv6 feature support we need to bump this version for tooling to work. This does not mean we officially support DWARFv6. It just enables us testing the features gradually.
|
@llvm/pr-subscribers-llvm-binary-utilities @llvm/pr-subscribers-debuginfo Author: Michael Buch (Michael137) ChangesIn order to start testing DWARFv6 feature support we need to bump this version for tooling to work. This does not mean we officially support DWARFv6. It just enables us testing the features gradually. Full diff: https://github.com/llvm/llvm-project/pull/183838.diff 4 Files Affected:
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
index f95b78ec6babd..d7f4dfff34163 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
@@ -402,7 +402,7 @@ class LLVM_ABI DWARFContext : public DIContext {
getLocalsForAddress(object::SectionedAddress Address) override;
bool isLittleEndian() const { return DObj->isLittleEndian(); }
- static unsigned getMaxSupportedVersion() { return 5; }
+ static unsigned getMaxSupportedVersion() { return 6; }
static bool isSupportedVersion(unsigned version) {
return version >= 2 && version <= getMaxSupportedVersion();
}
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s b/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
index 5921f75643273..c439a66afcd95 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
@@ -53,7 +53,7 @@ Ltu_begin0:
.byte 0
Lcu_begin1:
.long 10 ## Length of Unit
- .short 6 ## DWARF version number -- Error: The 16 bit unit header version is not valid.
+ .short 7 ## DWARF version number -- Error: The 16 bit unit header version is not valid.
.byte 1 ## DWARF Unit Type
.byte 4 ## Address Size (in bytes) -- The offset into the .debug_abbrev section is not valid.
.long Lline_table_start0
diff --git a/llvm/test/tools/llvm-dwp/X86/cu_tu_units_manual_v5_invalid.s b/llvm/test/tools/llvm-dwp/X86/cu_tu_units_manual_v5_invalid.s
index b13177435d04d..8947472fdd80f 100644
--- a/llvm/test/tools/llvm-dwp/X86/cu_tu_units_manual_v5_invalid.s
+++ b/llvm/test/tools/llvm-dwp/X86/cu_tu_units_manual_v5_invalid.s
@@ -13,15 +13,15 @@
# CHECK-NOT: .debug_info.dwo contents:
# CHECK-DAG: .debug_cu_index contents:
-# CHECK: warning: Failed to parse CU header in DWP file: DWARF unit at offset 0x00000000 has unsupported version 6, supported are 2-5
+# CHECK: warning: Failed to parse CU header in DWP file: DWARF unit at offset 0x00000000 has unsupported version 7, supported are 2-6
# CHECK-DAG: .debug_tu_index contents:
-# CHECK: warning: Failed to parse CU header in DWP file: DWARF unit at offset 0x00000000 has unsupported version 6, supported are 2-5
+# CHECK: warning: Failed to parse CU header in DWP file: DWARF unit at offset 0x00000000 has unsupported version 7, supported are 2-6
.section .debug_info.dwo,"e",@progbits
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
.Ldebug_info_dwo_start0:
- .short 6 # DWARF version number
+ .short 7 # DWARF version number
.byte 6 # DWARF Unit Type (DW_UT_split_type)
.byte 8 # Address Size (in bytes)
.long 0 # Offset Into Abbrev. Section
@@ -34,7 +34,7 @@
.section .debug_info.dwo,"e",@progbits
.long .Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit
.Ldebug_info_dwo_start1:
- .short 6 # DWARF version number
+ .short 7 # DWARF version number
.byte 6 # DWARF Unit Type (DW_UT_split_type)
.byte 8 # Address Size (in bytes)
.long 0 # Offset Into Abbrev. Section
@@ -47,7 +47,7 @@
.section .debug_info.dwo,"e",@progbits
.long .Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit
.Ldebug_info_dwo_start2:
- .short 6 # DWARF version number
+ .short 7 # DWARF version number
.byte 5 # DWARF Unit Type (DW_UT_split_compile)
.byte 8 # Address Size (in bytes)
.long 0 # Offset Into Abbrev. Section
diff --git a/llvm/test/tools/llvm-symbolizer/split-dwarf-dwp-invalid.test b/llvm/test/tools/llvm-symbolizer/split-dwarf-dwp-invalid.test
index 46b244b1315a5..62f86de5621fa 100644
--- a/llvm/test/tools/llvm-symbolizer/split-dwarf-dwp-invalid.test
+++ b/llvm/test/tools/llvm-symbolizer/split-dwarf-dwp-invalid.test
@@ -20,8 +20,8 @@ that skips the null entries, keeping those only as an implementation detail?) -
or perhaps just have a separate list of offsets that have failed to parse
previously?
-CHECK: warning: DWARF unit at offset 0x00000000 has unsupported version 255, supported are 2-5
-CHECK: warning: DWARF unit at offset 0x00000000 has unsupported version 255, supported are 2-5
+CHECK: warning: DWARF unit at offset 0x00000000 has unsupported version 255, supported are 2-6
+CHECK: warning: DWARF unit at offset 0x00000000 has unsupported version 255, supported are 2-6
CHECK: other()
CHECK: /usr/local/google/home/blaikie/dev/scratch{{[/\\]}}other.cpp:1:16
|
dwblaikie
left a comment
There was a problem hiding this comment.
(see comment on teh mc review - might be nice to have a warning when parsing a v6 input that support is in flux and there's no guarantee this v6 file will be able to be parsed with future versions of LLVM because the v6 spec might change in incompatible ways)
Depends on: * #183838 * #183841 * #183859 Bumps the supported version to 6. Unit header layout hasn't changed between versions AFAIK, so re-used the DWARF5 `FileCheck` in the test. This by no means claims full DWARFv6 support, but is handy for testing DWARFv6 features while full support is being gradually implemented.
Depends on: * llvm/llvm-project#183838 * llvm/llvm-project#183841 * llvm/llvm-project#183859 Bumps the supported version to 6. Unit header layout hasn't changed between versions AFAIK, so re-used the DWARF5 `FileCheck` in the test. This by no means claims full DWARFv6 support, but is handy for testing DWARFv6 features while full support is being gradually implemented.
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/20432 Here is the relevant piece of the build log for the reference |
In order to start testing DWARFv6 feature support we need to bump this version for tooling to work. This does not mean we officially support DWARFv6. It just enables us testing the features gradually.
Depends on: * llvm#183838 * llvm#183841 * llvm#183859 Bumps the supported version to 6. Unit header layout hasn't changed between versions AFAIK, so re-used the DWARF5 `FileCheck` in the test. This by no means claims full DWARFv6 support, but is handy for testing DWARFv6 features while full support is being gradually implemented.
In order to start testing DWARFv6 feature support we need to bump this version for tooling to work. This does not mean we officially support DWARFv6. It just enables us testing the features gradually.
Depends on: * llvm#183838 * llvm#183841 * llvm#183859 Bumps the supported version to 6. Unit header layout hasn't changed between versions AFAIK, so re-used the DWARF5 `FileCheck` in the test. This by no means claims full DWARFv6 support, but is handy for testing DWARFv6 features while full support is being gradually implemented.
Depends on: * llvm/llvm-project#183838 * llvm/llvm-project#183841 * llvm/llvm-project#183859 Bumps the supported version to 6. Unit header layout hasn't changed between versions AFAIK, so re-used the DWARF5 `FileCheck` in the test. This by no means claims full DWARFv6 support, but is handy for testing DWARFv6 features while full support is being gradually implemented.
In order to start testing DWARFv6 feature support we need to bump this version for tooling to work.
This does not mean we officially support DWARFv6. It just enables us testing the features gradually.