#include <stdint.h>
+#if defined(HAVE_LIBDW)
+# include <elfutils/libdwfl.h>
+#endif
+
#include "callback.h"
#include "forward.h"
#include "sysdep.h"
struct arch_library_data arch;
struct os_library_data os;
+
+#if defined(HAVE_LIBDW)
+ Dwfl *dwfl;
+#endif
};
/* Init LIB. */
#include "type.h"
#include "value.h"
#include "value_dict.h"
+#include "filter.h"
+
+#if defined(HAVE_LIBDW)
+#include "dwarf_prototypes.h"
+#endif
static struct process *current_proc = NULL;
static size_t current_depth = 0;
&& lib->type == LT_LIBTYPE_DSO
&& 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 )))
+ import_DWARF_prototypes(lib->protolib, lib, lib->dwfl);
+#endif
+
if (lib->protolib == NULL)
lib->protolib = protolib_cache_default(&g_protocache,
buf, 0);
#include "proc.h"
#include "value_dict.h"
#include "dwarf_prototypes.h"
-#include "filter.h"
#ifndef OS_HAVE_PROCESS_DATA
int
}
}
- if( 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->protolib, lib, dwfl );
- }
+ lib->dwfl = dwfl;
#endif /* defined(HAVE_LIBDW) */