diff options
author | Dima Kogan <dima@secretsauce.net> | 2014-04-23 15:55:41 -0700 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-22 20:38:25 +0900 |
commit | bbf56636fb1e0c893251a562ee47c80c3fc577ba (patch) | |
tree | 1233d5c50f71c13ca6c88c4fb83efcd056ca18f2 | |
parent | 76c720d508ffff78fc3c68dccdb64be95ce5418a (diff) | |
download | ltrace-bbf56636fb1e0c893251a562ee47c80c3fc577ba.tar.gz ltrace-bbf56636fb1e0c893251a562ee47c80c3fc577ba.tar.bz2 ltrace-bbf56636fb1e0c893251a562ee47c80c3fc577ba.zip |
If a functions is defined in a .conf, I do not parse the DWARF
Previously I would parse the DWARF data for such a function, but I wouldn't use
the result. Now I don't even parse
-rw-r--r-- | dwarf_prototypes.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/dwarf_prototypes.c b/dwarf_prototypes.c index 2960da3..1068bbb 100644 --- a/dwarf_prototypes.c +++ b/dwarf_prototypes.c @@ -714,6 +714,12 @@ static bool import_subprogram(struct protolib* plib, struct library* lib, return true; } + if (!filter_matches_symbol(options.plt_filter, function_name, lib) && + !filter_matches_symbol(options.static_filter, function_name, lib) && + !filter_matches_symbol(options.export_filter, function_name, lib)) { + complain(die, "Prototype not requested by any filter"); + return true; + } complain(die, "subroutine_type: 0x%02x; function '%s'", dwarf_tag(die), function_name); @@ -726,13 +732,6 @@ static bool import_subprogram(struct protolib* plib, struct library* lib, return true; } - if (!filter_matches_symbol(options.plt_filter, function_name, lib) && - !filter_matches_symbol(options.static_filter, function_name, lib) && - !filter_matches_symbol(options.export_filter, function_name, lib)) { - complain(die, "Prototype not requested by any filter"); - return true; - } - proto = malloc(sizeof(struct prototype)); if (proto == NULL) { complain(die, "couldn't alloc prototype"); |