summaryrefslogtreecommitdiff
path: root/tests/testfile_class_func.bz2
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2013-09-20 09:50:42 -0400
committerMark Wielaard <mjw@redhat.com>2013-09-24 10:28:14 +0200
commit1b734df17fca9f89a887b85ffe74616a87388f51 (patch)
tree2dc0ba75b4c517261ad60a17f96b6f766722f9b5 /tests/testfile_class_func.bz2
parent21fc33fe191603b71e9e14d2d1a79a8aa48ad6e6 (diff)
downloadelfutils-1b734df17fca9f89a887b85ffe74616a87388f51.tar.gz
libdw: Make dwarf_getfuncs find all (defining) DW_TAG_subprogram DIEs.
dwarf_getfuncs used to return only the DW_TAG_subprogram DIEs that were direct children of the given CU. This is normally how GCC outputs the subprogram DIEs. But not always. For nested functions the subprogram DIE is placed under the code construct DIE where it is nested. Other compilers might output the defining subprogram DIE of a C++ class function under the DW_TAG_namespace DIE where it was defined. Both such constructs seem allowed by the DWARF specification. So just searching the CU DIE children was wrong. To find all (defining) subprogram DIEs in a CU dwarf_getfuncs should use __libdw_visit_scopes to walk the tree for all DIEs that can contain subprograms as children. The only tricky part is making sure the offset returned and used when the callback returns DWARF_CB_ABORT is correct and the search continues at the right spot in the CU DIE tree. This operation now needs to rewalk the whole tree. Two new testcases were added that fail without this patch. And the allfcts test was tweaked so that it always returns DWARF_CB_ABORT from its callback to make sure the offset handling is correct. Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'tests/testfile_class_func.bz2')
-rwxr-xr-xtests/testfile_class_func.bz2bin0 -> 2962 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/tests/testfile_class_func.bz2 b/tests/testfile_class_func.bz2
new file mode 100755
index 00000000..e40dcf26
--- /dev/null
+++ b/tests/testfile_class_func.bz2
Binary files differ