aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-04-04 01:46:18 +0200
committerPetr Machata <pmachata@redhat.com>2012-04-19 01:35:47 +0200
commitb5f80ac8982c40f79915ce1e1cb9bf8650ac5fe7 (patch)
tree3dfd4a50ac074dbc2ac281b166b318f3b1b988ba /options.c
parent35c8814db9e7d41811cc4620c1bda084f4ff4c7b (diff)
downloadltrace-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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/options.c b/options.c
index 5651048..d4e16a8 100644
--- a/options.c
+++ b/options.c
@@ -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;
}