From bbf56636fb1e0c893251a562ee47c80c3fc577ba Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Wed, 23 Apr 2014 15:55:41 -0700 Subject: [PATCH] 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 --- dwarf_prototypes.c | 13 ++++++------- 1 file 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"); -- 2.7.4