dwarf-reader: Support more DWARF-5 type DIEs

When analyzing DWARF-5 some binaries, is_type_tag chokes on the new
DWARF-5 type DIEs it doesn't know about.

This patch teaches it about them.

	* src/abg-dwarf-reader.cc (is_type_tag): Support
	DW_TAG_coarray_type, DW_TAG_atomic_type and DW_TAG_immutable_type.
	* tests/data/test-diff-pkg/elfutils-debuginfo-0.183-1.el9.x86_64.rpm:
	Add new binary test input.
	* tests/data/test-diff-pkg/elfutils-libs-debuginfo-0.183-1.el9.x86_64.rpm: Likewise.
	* tests/data/test-diff-pkg/elfutils-libs-0.183-1.el9.x86_64.rpm: Likewise.
	* tests/data/test-diff-pkg/elfutils-libs-debuginfo-0.183-1.el9.x86_64-self-check-report-0.txt:
	Add new reference test output.
	* tests/test-diff-pkg.cc (in_out_specs): Add the test inputs above
	to the harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli
2021-03-18 11:58:44 +01:00
parent 915c66718b
commit 40aab37cf0
7 changed files with 23 additions and 0 deletions
+3
View File
@@ -8689,6 +8689,9 @@ is_type_tag(unsigned tag)
case DW_TAG_unspecified_type:
case DW_TAG_shared_type:
case DW_TAG_rvalue_reference_type:
case DW_TAG_coarray_type:
case DW_TAG_atomic_type:
case DW_TAG_immutable_type:
result = true;
break;
+4
View File
@@ -1809,6 +1809,10 @@ test-diff-pkg/sshpass-debuginfo-1.07-1.fc34.x86_64.rpm \
test-diff-pkg/nmap-7.70-5.el8_testjcc.x86_64-self-check-report-0.txt \
test-diff-pkg/nmap-7.70-5.el8_testjcc.x86_64.rpm \
test-diff-pkg/nmap-debuginfo-7.70-5.el8_testjcc.x86_64.rpm \
test-diff-pkg/elfutils-libs-debuginfo-0.183-1.el9.x86_64-self-check-report-0.txt \
test-diff-pkg/elfutils-libs-0.183-1.el9.x86_64.rpm \
test-diff-pkg/elfutils-libs-debuginfo-0.183-1.el9.x86_64.rpm \
test-diff-pkg/elfutils-debuginfo-0.183-1.el9.x86_64.rpm \
\
test-fedabipkgdiff/dbus-glib-0.104-3.fc23.x86_64.rpm \
test-fedabipkgdiff/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm \
@@ -0,0 +1,2 @@
==== SELF CHECK SUCCEEDED for 'libdw-0.183.so' ====
==== SELF CHECK SUCCEEDED for 'libasm-0.183.so' ====
+14
View File
@@ -682,6 +682,20 @@ static InOutSpec in_out_specs[] =
"data/test-diff-pkg/nmap-7.70-5.el8_testjcc.x86_64-self-check-report-0.txt",
"output/test-diff-pkg/nmap-7.70-5.el8_testjcc.x86_64-self-check-report-0.txt"
} ,
{
"data/test-diff-pkg/elfutils-libs-0.183-1.el9.x86_64.rpm",
"data/test-diff-pkg/elfutils-libs-0.183-1.el9.x86_64.rpm",
"--self-check",
"",
"data/test-diff-pkg/elfutils-debuginfo-0.183-1.el9.x86_64.rpm,"
"data/test-diff-pkg/elfutils-libs-debuginfo-0.183-1.el9.x86_64.rpm",
"data/test-diff-pkg/elfutils-debuginfo-0.183-1.el9.x86_64.rpm,"
"data/test-diff-pkg/elfutils-libs-debuginfo-0.183-1.el9.x86_64.rpm",
"",
"",
"data/test-diff-pkg/elfutils-libs-debuginfo-0.183-1.el9.x86_64-self-check-report-0.txt",
"output/test-diff-pkg/elfutils-libs-debuginfo-0.183-1.el9.x86_64-self-check-report-0.txt"
} ,
#endif // WITH_RPM_4_15
#endif //WITH_RPM