|
From: Nicholas N. <nj...@cs...> - 2006-10-15 11:08:23
|
On Sun, 15 Oct 2006 sv...@va... wrote: > Modified: trunk/include/pub_tool_options.h > =================================================================== > --- trunk/include/pub_tool_options.h 2006-10-15 00:07:24 UTC (rev 6232) > +++ trunk/include/pub_tool_options.h 2006-10-15 01:25:13 UTC (rev 6233) > @@ -75,15 +75,24 @@ > XML output, in between <usercomment> tags. */ > extern HChar* VG_(clo_xml_user_comment); > > -/* Call this if a recognised option was bad for some reason. > - Note: don't use it just because an option was unrecognised -- return 'False' > - from VG_(tdict).tool_process_cmd_line_option) to indicate that. */ > -extern void VG_(bad_option) ( Char* opt ); > - > /* Vex iropt control. Tool-visible so tools can make Vex optimise > less aggressively if that is needed (callgrind needs this). */ > extern VexControl VG_(clo_vex_control); > > +/* Call this if a recognised option was bad for some reason. Note: > + don't use it just because an option was unrecognised -- return > + 'False' from VG_(tdict).tool_process_cmd_line_option) to indicate > + that. This function prints an error message, then shuts down the > + entire system. */ > +extern void VG_(err_bad_option) ( Char* opt ); > + > +/* Similarly - complain that the executable is missing, then stop. */ > +extern void VG_(err_missing_prog) ( void ); > + > +/* Similarly - complain about some config error. */ > +extern void VG_(err_config_error) ( Char* msg ); Hmm, there isn't any reason why a tool should call err_missing_prog or err_config_error... I think those two should stay in m_main.c. I see the similarity between the three functions, perhaps that should be factored out into another function. Nick |