Support for powerpc64 arch ppc64el
[platform/upstream/ltrace.git] / output.c
index f7d23ce..8d378ea 100644 (file)
--- a/output.c
+++ b/output.c
@@ -50,6 +50,7 @@
 #include "value.h"
 #include "value_dict.h"
 #include "filter.h"
+#include "debug.h"
 
 #if defined(HAVE_LIBDW)
 #include "dwarf_prototypes.h"
@@ -213,11 +214,18 @@ library_get_prototype(struct library *lib, const char *name)
                         && snip_period(buf));
 
 #if defined(HAVE_LIBDW)
-               if (lib->protolib == NULL && lib->dwfl != NULL &&
-                       (filter_matches_library(options.plt_filter,    lib ) ||
-                        filter_matches_library(options.static_filter, lib ) ||
-                        filter_matches_library(options.export_filter, lib )))
+               // DWARF data fills in the gaps in the .conf files, so I don't
+               // check for lib->protolib==NULL here
+               if (lib->dwfl != NULL &&
+                   (filter_matches_library(options.plt_filter,    lib ) ||
+                    filter_matches_library(options.static_filter, lib ) ||
+                    filter_matches_library(options.export_filter, lib )))
                        import_DWARF_prototypes(lib);
+               else
+                       debug(DEBUG_FUNCTION,
+                             "Filter didn't match prototype '%s' in lib '%s'. "
+                             "Not importing",
+                             name, lib->soname);
 #endif
 
                if (lib->protolib == NULL)