From c60a55f23fb41890e59887749a2248aecb4c6ffe Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 3 May 2009 06:49:02 +0200 Subject: [PATCH] Don't recurse into DW_AT_declaration subprograms in iterate_over_labels. Newer gcc (4.4) places more DW_TAG_subprograms with DW_AT_declaration at call sites. iterate_over_labels should only be concerned about complete declarations. * tapsets.cxx (dwflpp::iterate_over_labels): Skip DW_TAG_subprogram that has attribute DW_AT_declaration. --- tapsets.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tapsets.cxx b/tapsets.cxx index b040c622f..db14a787e 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -3069,7 +3069,10 @@ dwflpp::iterate_over_labels (Dwarf_Die *begin_die, case DW_TAG_label: break; case DW_TAG_subprogram: - function_name = name; + if (!dwarf_hasattr(&die, DW_AT_declaration)) + function_name = name; + else + continue; default: if (dwarf_haschildren (&die)) iterate_over_labels (&die, q, callback); -- 2.43.5