diff options
author | Juan Cespedes <cespedes@debian.org> | 2007-08-31 18:49:48 +0200 |
---|---|---|
committer | Juan Cespedes <cespedes@debian.org> | 2007-08-31 18:49:48 +0200 |
commit | aee093126654f722523b47848a0c5449e39cf4bb (patch) | |
tree | 30c8c62185406f4aab5c907f947e0a8d5af90055 /ltrace.h | |
parent | 55ed83b24df9c6d671091a8c75caab33ffecd40e (diff) | |
download | ltrace-aee093126654f722523b47848a0c5449e39cf4bb.tar.gz |
Some random fixes
* General: Small fixes (indentation, typos, clean-up of code)
* ltrace.c: Close output file on exit
* ltrace.c: use getenf("HOME") instead of getpwuid(geteuid())->pw_dir
* read_config_file.c, display_args.c: remove "ignore" argtype;
that's what "void" is for
* packaging/debian/: misc fixes, sync with version 0.5-1
* etc/ltrace.conf: added more system calls
* testsuite/ltrace.minor/trace-clone.c: sleep(1) to avoid earlier
termination of process
* sysdeps/linux-gnu/trace.c: trace_pid(): reverted Petr's patch
to wait for child to stop, as it stopped following clone()
* process_event.c: Disable breakpoints before doing fork() (again!),
to make children work as expected
Diffstat (limited to 'ltrace.h')
-rw-r--r-- | ltrace.h | 99 |
1 files changed, 49 insertions, 50 deletions
@@ -46,59 +46,58 @@ enum arg_type { ARGTYPE_FORMAT, /* printf-like format */ ARGTYPE_STRING, /* NUL-terminated string */ 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 */ + ARGTYPE_ARRAY, /* Series of values in memory */ + ARGTYPE_ENUM, /* Enumeration */ + ARGTYPE_STRUCT, /* Structure of values */ + ARGTYPE_POINTER, /* Pointer to some other type */ + ARGTYPE_COUNT /* number of ARGTYPE_* values */ }; typedef struct arg_type_info_t { - enum arg_type type; - int arg_num; - union { - // ARGTYPE_ENUM - struct { - size_t entries; - char **keys; - int *values; - } enum_info; - - // ARGTYPE_ARRAY - struct { - struct arg_type_info_t *elt_type; - size_t elt_size; - int len_spec; - } array_info; - - // ARGTYPE_STRING_N - struct { - int size_spec; - } string_n_info; - - // ARGTYPE_STRUCT - struct { - struct arg_type_info_t **fields; // NULL-terminated - size_t *offset; - size_t size; - } struct_info; - - // ARGTYPE_POINTER - struct { - struct arg_type_info_t *info; - } ptr_info; - - // ARGTYPE_FLOAT - struct { - size_t float_index; - } float_info; - - // ARGTYPE_DOUBLE - struct { - size_t float_index; - } double_info; - } u; + enum arg_type type; + int arg_num; + union { + // ARGTYPE_ENUM + struct { + size_t entries; + char **keys; + int *values; + } enum_info; + + // ARGTYPE_ARRAY + struct { + struct arg_type_info_t *elt_type; + size_t elt_size; + int len_spec; + } array_info; + + // ARGTYPE_STRING_N + struct { + int size_spec; + } string_n_info; + + // ARGTYPE_STRUCT + struct { + struct arg_type_info_t **fields; // NULL-terminated + size_t *offset; + size_t size; + } struct_info; + + // ARGTYPE_POINTER + struct { + struct arg_type_info_t *info; + } ptr_info; + + // ARGTYPE_FLOAT + struct { + size_t float_index; + } float_info; + + // ARGTYPE_DOUBLE + struct { + size_t float_index; + } double_info; + } u; } arg_type_info; enum tof { |