diff options
| author | jolsa@redhat.com <jolsa@redhat.com> | 2011-10-21 11:10:51 +0200 |
|---|---|---|
| committer | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-11-24 21:20:27 +0100 |
| commit | 8967d2b09abc5f3e2bace9f6f14e1cfef8e47030 (patch) | |
| tree | f5d4a59b81327608e08c4f1d7b386b5e81e93ff8 /src/error.h | |
| parent | 27b90e3d32a6c311fca017f55d0fb8e2a1bd451e (diff) | |
| download | latrace-8967d2b09abc5f3e2bace9f6f14e1cfef8e47030.tar.gz latrace-8967d2b09abc5f3e2bace9f6f14e1cfef8e47030.tar.xz latrace-8967d2b09abc5f3e2bace9f6f14e1cfef8e47030.zip | |
error simulation: automation application part
Diffstat (limited to 'src/error.h')
| -rw-r--r-- | src/error.h | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/src/error.h b/src/error.h index 2486549..d22ba4f 100644 --- a/src/error.h +++ b/src/error.h @@ -8,24 +8,25 @@ enum { LT_ERROR_FILTER_TYPE_INTERACTIVE, }; -struct lt_error_def_filter { +struct lt_error_config_filter { int type; }; -struct lt_error_def_sym { +struct lt_error_config_sym { #define LT_MAXNAME 20 char symbol[LT_MAXNAME]; +#define LT_MAXRET 20 long ret; + struct lt_error_config_filter filter; + int handle_sigsegv; - struct lt_error_def_filter filter; + int keep; }; -struct lt_error_def { -#define LT_ERROR_MAXSYM 50 - struct lt_error_def_sym sym[LT_ERROR_MAXSYM]; - - /* call number */ +struct lt_error_config { unsigned long n; + int sym_cnt; + struct lt_error_config_sym sym[0]; }; struct lt_error_audit_filter { @@ -47,8 +48,18 @@ struct lt_error_sym { struct lt_error_app_return_sym { char *name; - long val; + +#define LT_MAX_SYM_RETURNS 10 + union { + long val; + long vals[LT_MAX_SYM_RETURNS]; + }; + + /* When the symbol return is changed, + * set SIGSEGV handlers. */ int handle_sigsegv; + /* Do not change the return value. */ + int keep; struct lt_list_head list; }; @@ -78,6 +89,8 @@ struct lt_error_app_run { struct lt_error_app_go { int n; int start; + int automated; + int replay; char *name; struct lt_list_head head_run; @@ -97,6 +110,7 @@ struct lt_error_app { }; struct lt_config_app; +struct lt_config_audit; #ifdef CONFIG_ARCH_HAVE_ERROR_SIM int lt_error_app(struct lt_config_app *cfg, @@ -105,6 +119,7 @@ int lt_error_go(struct lt_config_app *cfg, struct lt_error_app_go **go, struct lt_error_app *error_app, char *name, int start, int n, + int automated, int replay, struct lt_list_head *runs); int lt_error_run_return(struct lt_config_app *cfg, struct lt_error_app_run **run, @@ -115,13 +130,14 @@ int lt_error_run_args(struct lt_config_app *cfg, struct lt_list_head *args); int lt_error_return_ass(struct lt_config_app *cfg, struct lt_error_app_return **ret, - char *name, unsigned long val, - int handle_sigsegv); + char *name, struct lt_list_head *list_vals, + int handle_sigsegv, int keep); int lt_error_return_filter(struct lt_config_app *cfg, struct lt_error_app_return **ret, int type, void *data); - int lt_error_app_init(struct lt_error_app *app); +int lt_error_config_write(struct lt_config_app *cfg, int fd); +int lt_error_config_read(struct lt_config_audit *cfg, int fd); #else static inline int lt_error_app(struct lt_config_app *cfg, struct lt_error_app *error_app) @@ -133,6 +149,7 @@ static inline int lt_error_go(struct lt_config_app *cfg, struct lt_error_app_go **go, struct lt_error_app *error_app, char *name, int start, int n, + int automated, int replay, struct lt_list_head *runs) { return -1; @@ -160,7 +177,8 @@ static inline int lt_error_app_init(struct lt_error_app *app) static inline int lt_error_return_ass(struct lt_config_app *cfg, struct lt_error_app_return **ret, - char *name, unsigned long val) + char *name, struct lt_list_head *list_vals, + int handle_sigsegv, int keep) { return -1; } @@ -172,6 +190,10 @@ static inline int lt_error_return_filter(struct lt_config_app *cfg, return -1; } +static inline int lt_error_config_write(struct lt_config_app *cfg, int fd) +{ + return 0; +} #endif #endif /* ERROR_H */ |
