From 063906a93ee3ea5b976f43e2dd1f73d29605fa4c Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 17 Nov 2009 22:20:32 +0100 Subject: Search other CUs of the module when resolving declarations. * dwflpp.h (declaration_resolve_other_cus): New method. (iterate_over_globals): Mark as static and takes a CU to iterate over. (global_alias_caching_callback_cus): New method. * dwflpp.cxx (global_alias_caching_callback_cus): New method. (declaration_resolve_other_cus): New method. (declaration_resolve): Call iterate_over_globals() with current cu. Call declaration_resolve_other_cus() when name not found. (iterate_over_globals): Takes cu_die to iterate over as argument. --- dwflpp.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dwflpp.h') diff --git a/dwflpp.h b/dwflpp.h index b3f71eb2..cdc6ad98 100644 --- a/dwflpp.h +++ b/dwflpp.h @@ -213,6 +213,7 @@ struct dwflpp std::vector getscopes(Dwarf_Addr pc); Dwarf_Die *declaration_resolve(const char *name); + Dwarf_Die *declaration_resolve_other_cus(const char *name); mod_cu_function_cache_t cu_function_cache; @@ -319,8 +320,10 @@ private: */ mod_cu_type_cache_t global_alias_cache; static int global_alias_caching_callback(Dwarf_Die *die, void *arg); - int iterate_over_globals (int (* callback)(Dwarf_Die *, void *), - void * data); + static int global_alias_caching_callback_cus(Dwarf_Die *die, void *arg); + static int iterate_over_globals (Dwarf_Die *, + int (* callback)(Dwarf_Die *, void *), + void * data); static int cu_function_caching_callback (Dwarf_Die* func, void *arg); -- cgit