Crashlog: Re-use BFD instances for the same object
This commit is contained in:
@@ -29,9 +29,23 @@
|
||||
#undef PACKAGE_VERSION
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
|
||||
#if defined(WITH_BFD)
|
||||
struct sym_info_bfd;
|
||||
void lookup_addr_bfd(const char *obj_file_name, sym_info_bfd &info);
|
||||
|
||||
struct sym_bfd_obj {
|
||||
bfd *abfd = nullptr;
|
||||
asymbol **syms = nullptr;
|
||||
const char *file_name = nullptr;
|
||||
long sym_count = 0;
|
||||
bool usable = false;
|
||||
|
||||
~sym_bfd_obj();
|
||||
};
|
||||
|
||||
struct sym_bfd_obj_cache {
|
||||
std::map<std::string, sym_bfd_obj> cache;
|
||||
};
|
||||
|
||||
struct sym_info_bfd {
|
||||
bfd_vma addr;
|
||||
@@ -45,9 +59,10 @@ struct sym_info_bfd {
|
||||
bool found;
|
||||
|
||||
sym_info_bfd(bfd_vma addr_);
|
||||
~sym_info_bfd();
|
||||
};
|
||||
|
||||
void lookup_addr_bfd(const char *obj_file_name, sym_bfd_obj_cache &bfdc, sym_info_bfd &info);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* CRASHLOG_BFD_H */
|
||||
|
||||
Reference in New Issue
Block a user