From: Nicholas Nethercote Date: Mon, 22 Nov 2004 16:46:13 +0000 (+0000) Subject: Convert the 'skin_errors' need to 'tool_errors'. X-Git-Tag: svn/VALGRIND_3_0_0~1265 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=48aff7c26f1fd2cbb7091ef82a9e40c808b28a63;p=thirdparty%2Fvalgrind.git Convert the 'skin_errors' need to 'tool_errors'. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3053 --- diff --git a/addrcheck/ac_main.c b/addrcheck/ac_main.c index ea90b0a18c..8d94404a67 100644 --- a/addrcheck/ac_main.c +++ b/addrcheck/ac_main.c @@ -1261,7 +1261,7 @@ void SK_(pre_clo_init)(void) VG_(details_avg_translation_sizeB) ( 135 ); VG_(needs_core_errors) (); - VG_(needs_skin_errors) (); + VG_(needs_tool_errors) (); VG_(needs_libc_freeres) (); VG_(needs_command_line_options)(); VG_(needs_client_requests) (); diff --git a/configure.in b/configure.in index 1401ea191b..87cc3a7cfb 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AM_INIT_AUTOMAKE AM_MAINTAINER_MODE # Where is VEX ? ToDo: --with-vex= -VEX_DIR=/home/sewardj/Vex/vex/trunk +VEX_DIR=/home/njn/vex/trunk AC_SUBST(VEX_DIR) # Checks for programs. diff --git a/coregrind/core.h b/coregrind/core.h index 6fcd9a69f7..4ad5b6c952 100644 --- a/coregrind/core.h +++ b/coregrind/core.h @@ -381,7 +381,7 @@ typedef struct { Bool libc_freeres; Bool core_errors; - Bool skin_errors; + Bool tool_errors; Bool basic_block_discards; Bool shadow_regs; Bool command_line_options; diff --git a/coregrind/docs/coregrind_tools.html b/coregrind/docs/coregrind_tools.html index c9546509aa..5aa335d463 100644 --- a/coregrind/docs/coregrind_tools.html +++ b/coregrind/docs/coregrind_tools.html @@ -457,7 +457,7 @@ command line options; wrap system calls; record extra information about malloc'd blocks, etc.

For example, if a tool wants the core's help in recording and reporting errors, -it must set the skin_errors need to True, and then +it must set the tool_errors need to True, and then provide definitions of six functions for comparing errors, printing out errors, reading suppressions from a suppressions file, etc. While writing these functions requires some work, it's much less than doing error handling from diff --git a/coregrind/toolfuncs.def b/coregrind/toolfuncs.def index 2ea1bec9e9..27ec8ff661 100644 --- a/coregrind/toolfuncs.def +++ b/coregrind/toolfuncs.def @@ -38,7 +38,7 @@ void, fini, Int exitcode ## (none needed) ## ------------------------------------------------------------------ -## VG_(needs).skin_errors +## VG_(needs).tool_errors ## Identify if two errors are equal, or equal enough. `res' indicates how ## close is "close enough". `res' should be passed on as necessary, eg. if diff --git a/coregrind/vg_errcontext.c b/coregrind/vg_errcontext.c index 45a5c2cc6c..1b8f704808 100644 --- a/coregrind/vg_errcontext.c +++ b/coregrind/vg_errcontext.c @@ -213,10 +213,10 @@ static Bool eq_Error ( VgRes res, Error* e1, Error* e2 ) return True; return False; default: - if (VG_(needs).skin_errors) + if (VG_(needs).tool_errors) return SK_(eq_SkinError)(res, e1, e2); else { - VG_(printf)("\nUnhandled error type: %u. VG_(needs).skin_errors\n" + VG_(printf)("\nUnhandled error type: %u. VG_(needs).tool_errors\n" "probably needs to be set.\n", e1->ekind); VG_(skin_panic)("unhandled error type"); @@ -238,10 +238,10 @@ static void pp_Error ( Error* err, Bool printCount ) VG_(pp_ExeContext)(err->where); break; default: - if (VG_(needs).skin_errors) + if (VG_(needs).tool_errors) SK_(pp_SkinError)( err ); else { - VG_(printf)("\nUnhandled error type: %u. VG_(needs).skin_errors\n" + VG_(printf)("\nUnhandled error type: %u. VG_(needs).tool_errors\n" "probably needs to be set?\n", err->ekind); VG_(skin_panic)("unhandled error type"); @@ -531,7 +531,7 @@ void VG_(maybe_record_error) ( ThreadId tid, *p = err; /* update `extra', for non-core errors (core ones don't use 'extra') */ - if (VG_(needs).skin_errors && PThreadErr != ekind) { + if (VG_(needs).tool_errors && PThreadErr != ekind) { extra_size = SK_(update_extra)(p); /* copy block pointed to by `extra', if there is one */ @@ -843,7 +843,7 @@ static void load_one_suppressions_file ( Char* filename ) } /* Is it a tool suppression? */ - else if (VG_(needs).skin_errors && + else if (VG_(needs).tool_errors && tool_name_present(VG_(details).name, tool_names)) { if (SK_(recognised_suppression)(supp_name, supp)) @@ -864,7 +864,7 @@ static void load_one_suppressions_file ( Char* filename ) continue; } - if (VG_(needs).skin_errors && + if (VG_(needs).tool_errors && !SK_(read_extra_suppression_info)(fd, buf, N_BUF, supp)) goto syntax_error; @@ -956,11 +956,11 @@ Bool supp_matches_error(Supp* su, Error* err) case PThreadSupp: return (err->ekind == PThreadErr); default: - if (VG_(needs).skin_errors) { + if (VG_(needs).tool_errors) { return SK_(error_matches_suppression)(err, su); } else { VG_(printf)( - "\nUnhandled suppression type: %u. VG_(needs).skin_errors\n" + "\nUnhandled suppression type: %u. VG_(needs).tool_errors\n" "probably needs to be set.\n", err->ekind); VG_(skin_panic)("unhandled suppression type"); diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index bbe0b6a925..70752d82aa 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -2020,7 +2020,7 @@ static void process_cmd_line_options( UInt* client_auxv, const char* toolname ) } if (VG_(clo_n_suppressions) < VG_CLO_MAX_SFILES-1 && - (VG_(needs).core_errors || VG_(needs).skin_errors)) { + (VG_(needs).core_errors || VG_(needs).tool_errors)) { /* If there are no suppression files specified and the tool needs one, load the default */ static const Char default_supp[] = "default.supp"; @@ -2032,7 +2032,7 @@ static void process_cmd_line_options( UInt* client_auxv, const char* toolname ) } if (VG_(clo_gen_suppressions) && - !VG_(needs).core_errors && !VG_(needs).skin_errors) { + !VG_(needs).core_errors && !VG_(needs).tool_errors) { VG_(message)(Vg_UserMsg, "Can't use --gen-suppressions=yes with this tool,"); VG_(message)(Vg_UserMsg, @@ -2817,7 +2817,7 @@ int main(int argc, char **argv) // Read suppression file // p: process_cmd_line_options() [for VG_(clo_suppressions)] //-------------------------------------------------------------- - if (VG_(needs).core_errors || VG_(needs).skin_errors) + if (VG_(needs).core_errors || VG_(needs).tool_errors) VG_(load_suppressions)(); //-------------------------------------------------------------- @@ -2878,7 +2878,7 @@ int main(int argc, char **argv) if (VG_(clo_track_fds)) VG_(show_open_fds)(); - if (VG_(needs).core_errors || VG_(needs).skin_errors) + if (VG_(needs).core_errors || VG_(needs).tool_errors) VG_(show_all_errors)(); SK_(fini)( exitcode ); diff --git a/coregrind/vg_needs.c b/coregrind/vg_needs.c index ad509e7e76..0055423a35 100644 --- a/coregrind/vg_needs.c +++ b/coregrind/vg_needs.c @@ -48,7 +48,7 @@ VgDetails VG_(details) = { VgNeeds VG_(needs) = { .core_errors = False, - .skin_errors = False, + .tool_errors = False, .libc_freeres = False, .basic_block_discards = False, .shadow_regs = False, @@ -156,7 +156,7 @@ DETAILS(UInt, avg_translation_sizeB) NEEDS(libc_freeres) NEEDS(core_errors) -NEEDS(skin_errors) +NEEDS(tool_errors) NEEDS(basic_block_discards) NEEDS(shadow_regs) NEEDS(command_line_options) diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index aab4bf5915..01e0af0ef4 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -3275,7 +3275,7 @@ void SK_(pre_clo_init)(void) VG_(details_avg_translation_sizeB) ( 115 ); VG_(needs_core_errors)(); - VG_(needs_skin_errors)(); + VG_(needs_tool_errors)(); VG_(needs_data_syms)(); VG_(needs_client_requests)(); VG_(needs_command_line_options)(); diff --git a/include/tool.h.base b/include/tool.h.base index 09b406482b..c2a9d7fdbb 100644 --- a/include/tool.h.base +++ b/include/tool.h.base @@ -1822,7 +1822,7 @@ extern void VG_(needs_core_errors) ( void ); lot like being a member of a type class. */ /* Want to report errors from tool? This implies use of suppressions, too. */ -extern void VG_(needs_skin_errors) ( void ); +extern void VG_(needs_tool_errors) ( void ); /* Is information kept about specific individual basic blocks? (Eg. for cachegrind there are cost-centres for every instruction, stored at a diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index 7ccf556095..91ceaa47c3 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -1930,7 +1930,7 @@ void SK_(pre_clo_init)(void) VG_(details_avg_translation_sizeB) ( 228 ); VG_(needs_core_errors) (); - VG_(needs_skin_errors) (); + VG_(needs_tool_errors) (); VG_(needs_libc_freeres) (); VG_(needs_shadow_regs) (); VG_(needs_command_line_options)();