diff options
author | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2012-01-08 19:54:14 +0100 |
---|---|---|
committer | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2012-01-09 21:34:42 +0100 |
commit | c5ae864395919663cce9c70ff6078a42ba1acaa8 (patch) | |
tree | b70af8bc45497003b79b912ea12cc914722538fc /src/error.h | |
parent | d6b83af2ca0c27c873fcd6d149b9b5ac8a590848 (diff) | |
download | latrace-error_simulation4.tar.gz latrace-error_simulation4.tar.xz latrace-error_simulation4.zip |
changeserror_simulation4
Diffstat (limited to 'src/error.h')
-rw-r--r-- | src/error.h | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/src/error.h b/src/error.h index 5090749..97a16dd 100644 --- a/src/error.h +++ b/src/error.h @@ -12,41 +12,38 @@ struct lt_error_config_filter { int type; }; -struct lt_error_config_sym { -/* FIXME put to the end of the structure as symbol[0] */ -#define LT_MAXNAME 20 - char symbol[LT_MAXNAME]; +struct lt_error_sym { + /* + * It is 'symbol' for normal usage and 'index' for + * file storage in names section (see struct + * lt_error_config definition + */ + union { + char *symbol; + int index; + } name; #define LT_MAXRET 20 long ret; - struct lt_error_config_filter filter; + long call_current; + long call_configured; int handle_sigsegv; int keep; }; +/* + * stored in file like: + * + * struct lt_error_config + * struct lt_error_config_sym array + * names.. + */ struct lt_error_config { unsigned long n; - int automated; - int sym_cnt; - off_t names_size; - struct lt_error_config_sym sym[0]; -}; - -struct lt_error_audit_filter { int type; - union { - int **nth; - }; -}; - -struct lt_error_sym { - char *name; - unsigned long ret; - unsigned long call; - int handle_sigsegv; - struct lt_error_audit_filter filter; - - struct lt_list_head list; + int sym_cnt; + int names_size; + struct lt_error_sym sym[0]; }; struct lt_error_app_return_sym { @@ -89,7 +86,7 @@ struct lt_error_start { enum { LT_ERROR_RUN_TYPE_SEQ, - LT_ERROR_RUN_TYPE_AUTOMATED, + LT_ERROR_RUN_TYPE_AUTO, LT_ERROR_RUN_TYPE_REPLAY, }; @@ -138,6 +135,9 @@ int lt_error_run_return(struct lt_config_app *cfg, int lt_error_run_args(struct lt_config_app *cfg, struct lt_error_app_run **run, struct lt_list_head *args); +int lt_error_run_type(struct lt_config_app *cfg, + struct lt_error_app_run **run, + int type); int lt_error_return_ass(struct lt_config_app *cfg, struct lt_error_app_return **ret, char *name, struct lt_list_head *list_vals, @@ -178,6 +178,13 @@ static inline int lt_error_run_args(struct lt_config_app *cfg, return -1; } +static inline int lt_error_run_type(struct lt_config_app *cfg, + struct lt_error_app_run **run, + int type); +{ + return -1; +} + static inline int lt_error_app_init(struct lt_error_app *app) { return -1; |