diff options
author | Steve Fink <sphink@gmail.com> | 2006-08-07 06:10:08 +0200 |
---|---|---|
committer | Ian Wienand <ianw@debian.org> | 2006-08-07 06:10:08 +0200 |
commit | e4b3263fb2b32eb5ee0f693fc223ed8c363fbd69 (patch) | |
tree | cc708044654624fd22fdfe7d0b9b09f1bef0c9e7 /ltrace.h | |
parent | 1150bc4b812f0150e832607b8724b023d6d7d575 (diff) | |
download | ltrace-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.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 { |