From bd25380dad5aecf4a717aa42d99dd5c45c85f881 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 24 Aug 2009 17:54:40 -0700 Subject: PR2475: Filter filenames against the decl_file We used to only check that a CU contains at least one srcfile matching the user's file spec. This patch ensures that the selected function was actually defined in one of the matching srcfiles. * tapsets.cxx (struct dwarf_query): Make filtered_srcfiles carry strings, so we can easily lookup matches later. (query_dwarf_func): Check that the decl_file is in filtered_srcfiles. (query_cu): Adjust to using set. * dwflpp.cxx (dwflpp::collect_srcfiles_matching): Take a set. --- dwflpp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dwflpp.cxx') diff --git a/dwflpp.cxx b/dwflpp.cxx index 74a79cfa..8a02fc6a 100644 --- a/dwflpp.cxx +++ b/dwflpp.cxx @@ -1000,7 +1000,7 @@ dwflpp::iterate_over_labels (Dwarf_Die *begin_die, void dwflpp::collect_srcfiles_matching (string const & pattern, - set & filtered_srcfiles) + set & filtered_srcfiles) { assert (module); assert (cu); -- cgit