summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Kogan <dima@secretsauce.net>2014-04-23 03:41:55 -0700
committerChanho Park <chanho61.park@samsung.com>2014-08-22 20:38:25 +0900
commitf0ff9ff9af33ef420b3bdc6fd47d3648b09d5ec8 (patch)
tree0ff821abb60b674cdbc5c1ceee02a108554cb0e3
parent572c4648c0d567bd4868ff442149cd7b5603e370 (diff)
downloadltrace-f0ff9ff9af33ef420b3bdc6fd47d3648b09d5ec8.tar.gz
ltrace-f0ff9ff9af33ef420b3bdc6fd47d3648b09d5ec8.tar.bz2
ltrace-f0ff9ff9af33ef420b3bdc6fd47d3648b09d5ec8.zip
import_DWARF_prototypes() now takes JUST a lib argument
-rw-r--r--dwarf_prototypes.c12
-rw-r--r--dwarf_prototypes.h2
-rw-r--r--output.c2
3 files changed, 11 insertions, 5 deletions
diff --git a/dwarf_prototypes.c b/dwarf_prototypes.c
index f76dbed..24da288 100644
--- a/dwarf_prototypes.c
+++ b/dwarf_prototypes.c
@@ -779,9 +779,11 @@ static bool import(struct protolib* plib, struct library* lib, Dwfl* dwfl)
return true;
}
-bool import_DWARF_prototypes(struct protolib* plib, struct library* lib,
- Dwfl *dwfl)
+bool import_DWARF_prototypes(struct library* lib)
{
+ struct protolib* plib = lib->protolib;
+ Dwfl* dwfl = lib->dwfl;
+
if (plib == NULL) {
plib = protolib_cache_default(&g_protocache, lib->soname, 0);
if (plib == NULL) {
@@ -790,7 +792,11 @@ bool import_DWARF_prototypes(struct protolib* plib, struct library* lib,
}
}
- return import(plib, lib, dwfl);
+ if (import(plib, lib, dwfl)) {
+ lib->protolib = plib;
+ return true;
+ }
+ return false;
}
/*
diff --git a/dwarf_prototypes.h b/dwarf_prototypes.h
index 02ebf3f..e0b7392 100644
--- a/dwarf_prototypes.h
+++ b/dwarf_prototypes.h
@@ -6,4 +6,4 @@
#include "prototype.h"
#include "library.h"
-bool import_DWARF_prototypes(struct protolib* plib, struct library* lib, Dwfl *dwfl);
+bool import_DWARF_prototypes(struct library* lib);
diff --git a/output.c b/output.c
index 5dcc475..f7d23ce 100644
--- a/output.c
+++ b/output.c
@@ -217,7 +217,7 @@ library_get_prototype(struct library *lib, const char *name)
(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);
+ import_DWARF_prototypes(lib);
#endif
if (lib->protolib == NULL)