aboutsummaryrefslogtreecommitdiff
path: root/ltrace.h
diff options
context:
space:
mode:
authorSteve Fink <sphink@gmail.com>2006-08-07 06:10:08 +0200
committerIan Wienand <ianw@debian.org>2006-08-07 06:10:08 +0200
commite4b3263fb2b32eb5ee0f693fc223ed8c363fbd69 (patch)
treecc708044654624fd22fdfe7d0b9b09f1bef0c9e7 /ltrace.h
parent1150bc4b812f0150e832607b8724b023d6d7d575 (diff)
downloadltrace-e4b3263fb2b32eb5ee0f693fc223ed8c363fbd69.tar.gz
Add pointers to structs
* Allow parameters to be pointers to structs, which themselves can contain (nearly) any other type, including other structs or pointers to structs.
Diffstat (limited to 'ltrace.h')
-rw-r--r--ltrace.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/ltrace.h b/ltrace.h
index fe5fd87..2e0d01e 100644
--- a/ltrace.h
+++ b/ltrace.h
@@ -47,6 +47,7 @@ enum arg_type {
ARGTYPE_STRING_N, /* String of known maxlen */
ARGTYPE_ARRAY, /* Series of values in memory */
ARGTYPE_ENUM, /* Enumeration */
+ ARGTYPE_STRUCT, /* Structure of values */
ARGTYPE_IGNORE, /* Leave parameter blank */
ARGTYPE_POINTER, /* Pointer to some other type */
ARGTYPE_COUNT /* number of ARGTYPE_* values */
@@ -74,6 +75,14 @@ typedef struct arg_type_info_t {
int size_spec;
} string_n_info;
+ // ARGTYPE_STRUCT
+ struct {
+ struct arg_type_info_t **fields; // NULL-terminated
+ size_t *gap;
+ size_t *offset;
+ size_t size;
+ } struct_info;
+
// ARGTYPE_POINTER
struct {
struct arg_type_info_t *info;
@@ -86,7 +95,8 @@ enum tof {
LT_TOF_FUNCTION, /* A real library function */
LT_TOF_FUNCTIONR, /* Return from a real library function */
LT_TOF_SYSCALL, /* A syscall */
- LT_TOF_SYSCALLR /* Return from a syscall */
+ LT_TOF_SYSCALLR, /* Return from a syscall */
+ LT_TOF_STRUCT /* Not a function; read args from struct */
};
struct function {