diff options
author | Petr Machata <pmachata@redhat.com> | 2012-04-04 01:46:18 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-04-19 01:35:47 +0200 |
commit | b5f80ac8982c40f79915ce1e1cb9bf8650ac5fe7 (patch) | |
tree | 3dfd4a50ac074dbc2ac281b166b318f3b1b988ba /options.c | |
parent | 35c8814db9e7d41811cc4620c1bda084f4ff4c7b (diff) | |
download | ltrace-b5f80ac8982c40f79915ce1e1cb9bf8650ac5fe7.tar.gz |
Don't create PLT symbols that don't match filtering criteria
- instead of creating them, keeping them around, and then just not enabling
breakpoints for them
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -392,14 +392,14 @@ recursive_parse_chain(char *expr) } static void -parse_filter_chain(struct options_t *options, const char *expr) +parse_filter_chain(const char *expr, struct filter **retp) { char *str = strdup(expr); if (str == NULL) { error(0, errno, "filter '%s' will be ignored", expr); return; } - options->filter = recursive_parse_chain(str); + *retp = recursive_parse_chain(str); } char ** @@ -481,7 +481,7 @@ process_options(int argc, char **argv) { break; case 'e': - parse_filter_chain(&options, optarg); + parse_filter_chain(optarg, &options.plt_filter); break; case 'f': @@ -640,8 +640,8 @@ process_options(int argc, char **argv) { /* Set default filter. Use @MAIN for now, as that's what * ltrace used to have in the past. XXX Maybe we should make * this "*" instead. */ - if (options.filter == NULL) { - parse_filter_chain(&options, "@MAIN"); + if (options.plt_filter == NULL) { + parse_filter_chain("@MAIN", &options.plt_filter); options.hide_caller = 1; } |