aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorJuan Cespedes <cespedes@debian.org>2009-05-14 13:47:58 +0200
committerJuan Cespedes <cespedes@debian.org>2009-05-14 13:47:58 +0200
commitcd8976dbee947f152c3a322503a1063c6359da76 (patch)
tree2ceab3f0794ec394fdefc75f9be479339673efe1 /options.c
parent7c3b431ca18bebd4b78e8e254ad389bc26d6bd57 (diff)
downloadltrace-cd8976dbee947f152c3a322503a1063c6359da76.tar.gz
better debugging support (-d option)
Diffstat (limited to 'options.c')
-rw-r--r--options.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/options.c b/options.c
index e954eeb..042eb7a 100644
--- a/options.c
+++ b/options.c
@@ -93,9 +93,9 @@ usage(void) {
# endif
# endif
# if HAVE_GETOPT_LONG
- " -d, --debug print debugging info.\n"
+ " -d, --debug=LEVEL print debugging info.\n"
# else
- " -d print debugging info.\n"
+ " -d LEVEL print debugging info.\n"
# endif
" -e expr modify which events to trace.\n"
" -f trace children (fork() and clone()).\n"
@@ -226,18 +226,18 @@ process_options(int argc, char **argv) {
{"version", 0, 0, 'V'},
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, "+cdfhiLrStTV"
+ c = getopt_long(argc, argv, "+cfhiLrStTV"
# ifdef USE_DEMANGLE
"C"
# endif
- "a:A:e:F:l:n:o:p:s:u:x:X:", long_options,
+ "a:A:d:e:F:l:n:o:p:s:u:x:X:", long_options,
&option_index);
#else
- c = getopt(argc, argv, "+cdfhiLrStTV"
+ c = getopt(argc, argv, "+cfhiLrStTV"
# ifdef USE_DEMANGLE
"C"
# endif
- "a:A:e:F:l:n:o:p:s:u:x:X:");
+ "a:A:d:e:F:l:n:o:p:s:u:x:X:");
#endif
if (c == -1) {
break;
@@ -258,7 +258,7 @@ process_options(int argc, char **argv) {
break;
#endif
case 'd':
- options.debug++;
+ options.debug = strtoul(optarg,NULL,0);
break;
case 'e':
{