[Ltrace-devel] [PATCH 3/11] ignore params
Steve Fink
sphink at gmail.com
Sat Aug 5 23:55:12 UTC 2006
-------------- next part --------------
From d50f01af0a4188d18814a01eebe37707950d602d Mon Sep 17 00:00:00 2001
From: Steve Fink sphink at gmail.com <sphink at gmail.com>
Date: Thu, 20 Jul 2006 21:59:43 -0700
Subject: [PATCH 3/11] Add 'ignore' parameter descriptor. It just skips the corresponding argument
(so there will be two commas in a row, or whatever.)
---
ChangeLog | 4 ++++
display_args.c | 2 ++
etc/ltrace.conf | 1 +
ltrace.h | 1 +
read_config_file.c | 2 ++
5 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2b2443c..48287ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2006-07-20 Steve Fink <sphink at gmail.com>
+ * various: add 'ignore' parameter descriptor
+
+2006-07-20 Steve Fink <sphink at gmail.com>
+
* Implement string[argN] and string[N] parameter descriptors.
2006-07-27 Steve Fink <sphink at gmail.com>
diff --git a/display_args.c b/display_args.c
index 1c15f22..2669228 100644
--- a/display_args.c
+++ b/display_args.c
@@ -36,6 +36,8 @@ display_arg(enum tof type, struct proces
switch (info->type) {
case ARGTYPE_VOID:
return 0;
+ case ARGTYPE_IGNORE:
+ return 0; /* Empty gap between commas */
case ARGTYPE_INT:
return fprintf(output, "%d",
(int)gimme_arg(type, proc, arg_num));
diff --git a/etc/ltrace.conf b/etc/ltrace.conf
index 29c50ec..50a41eb 100644
--- a/etc/ltrace.conf
+++ b/etc/ltrace.conf
@@ -22,6 +22,7 @@
; string[retval] == (char *) [show only up to (return val) bytes]
; string[arg0] == (char *) [same as string[retval]]
; string[N] == (char *) [N>0] [show only up to N bytes]
+; ignore == (any) [ignore arg, output blank]
; Backwards-compatibility:
; string0 == (char *) [same as string[retval]]
diff --git a/ltrace.h b/ltrace.h
index dec2e0b..d030ce8 100644
--- a/ltrace.h
+++ b/ltrace.h
@@ -42,6 +42,7 @@ enum arg_type {
ARGTYPE_FORMAT, /* printf-like format */
ARGTYPE_STRING, /* NUL-terminated string */
ARGTYPE_STRING_N, /* String of known maxlen */
+ ARGTYPE_IGNORE, /* Leave parameter blank */
ARGTYPE_COUNT /* number of ARGTYPE_* values */
};
diff --git a/read_config_file.c b/read_config_file.c
index 6c9eb5d..3927af2 100644
--- a/read_config_file.c
+++ b/read_config_file.c
@@ -29,6 +29,7 @@ static struct list_of_pt_t {
"file", ARGTYPE_FILE}, {
"format", ARGTYPE_FORMAT}, {
"string", ARGTYPE_STRING}, {
+ "ignore", ARGTYPE_IGNORE}, {
NULL, ARGTYPE_UNKNOWN} /* Must finish with NULL */
};
@@ -45,6 +46,7 @@ static arg_type_info arg_type_singletons
{ ARGTYPE_FORMAT },
{ ARGTYPE_STRING },
{ ARGTYPE_STRING_N },
+ { ARGTYPE_IGNORE },
{ ARGTYPE_UNKNOWN }
};
--
1.4.1
More information about the Ltrace-devel
mailing list