aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-04-05 02:11:39 +0200
committerPetr Machata <pmachata@redhat.com>2012-04-19 01:36:36 +0200
commit67fa52f4999bb9e37f426e0559bad66c2aedd5de (patch)
treeb63776c35e635d3b4b1e077ebec640cccb9ddbea /options.c
parentecb082f480f057dc166c9d62e8776c892caf5e11 (diff)
downloadltrace-67fa52f4999bb9e37f426e0559bad66c2aedd5de.tar.gz
Drop options.libcalls (but keep -L support)
- -L becomes just a way of configuring options.plt_filter default
Diffstat (limited to 'options.c')
-rw-r--r--options.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/options.c b/options.c
index 6ad77e4..06757db 100644
--- a/options.c
+++ b/options.c
@@ -26,7 +26,6 @@ struct options_t options = {
.align = DEFAULT_ALIGN, /* alignment column for results */
.user = NULL, /* username to run command as */
.syscalls = 0, /* display syscalls */
- .libcalls = 1, /* display library calls */
#ifdef USE_DEMANGLE
.demangle = 0, /* Demangle low-level symbol names */
#endif
@@ -399,7 +398,8 @@ parse_filter_chain(const char *expr, struct filter **retp)
}
char **
-process_options(int argc, char **argv) {
+process_options(int argc, char **argv)
+{
progname = argv[0];
options.output = stderr;
options.no_signals = 0;
@@ -409,6 +409,8 @@ process_options(int argc, char **argv) {
guess_cols();
+ int libcalls = 1;
+
while (1) {
int c;
char *p;
@@ -504,7 +506,7 @@ process_options(int argc, char **argv) {
abort();
break;
case 'L':
- options.libcalls = 0;
+ libcalls = 0;
break;
case 'n':
options.indent = atoi(optarg);
@@ -608,7 +610,7 @@ 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.plt_filter == NULL) {
+ if (options.plt_filter == NULL && libcalls) {
parse_filter_chain("@MAIN", &options.plt_filter);
options.hide_caller = 1;
}