Changed startup message to give information about skin and core separately.
Added "version" and "copyright_author" fields for skins to supply.
Now startup message looks something like this:
==12698== cachegrind, an I1/D1/L2 cache profiler for x86-linux.
==12698== Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.
==12698== Built with valgrind-HEAD, a program execution monitor.
==12698== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==12698== Estimated CPU clock rate is 1422 MHz
==12698== For more details, rerun with: -v
The skin can specify a version number, but the skins that will be distributed
with Valgrind don't.
Also changed "x86 GNU/Linux" to the wicked "x86-linux" at Julian's request.
Updated default regression test filter to handle this new startup message.
----
Also moved the skin's name, description, etc., fields out of VG_(needs) into a
new struct VG_(details), since they are logically quite different to the needs.
Did a little code formatting, etc., for this. Updated skin docs
correspondingly, too.
Also renamed the need `run_libc_freeres' --> `libc_freeres' so it's a noun
phrase rather than a verb phrase.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1172 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/vg_skin.h b/include/vg_skin.h
index 8c9d077..530e113 100644
--- a/include/vg_skin.h
+++ b/include/vg_skin.h
@@ -1100,9 +1100,34 @@
/*=== Skin-specific stuff ===*/
/*====================================================================*/
-/* Skin-specific settings.
- *
- * If new fields are added to this type, update:
+/* ------------------------------------------------------------------ */
+/* Details */
+typedef
+ struct {
+ /* Information used in the startup message. `name' also determines the
+ string used for identifying suppressions in a suppression file as
+ belonging to this skin. `version' can be NULL, in which case (not
+ surprisingly) no version info is printed; this mechanism is
+ designed for skins distributed with Valgrind that share a version
+ number with Valgrind. Other skins not distributed as part of
+ Valgrind should probably have their own version number. */
+ Char* name;
+ Char* version;
+ Char* description;
+ Char* copyright_author;
+
+ /* String printed if an `sk_assert' assertion fails or VG_(skin_panic)
+ is called. Should probably be an email address. */
+ Char* bug_reports_to;
+ }
+ VgDetails;
+
+extern VgDetails VG_(details);
+
+/* ------------------------------------------------------------------ */
+/* Needs */
+
+/* If new fields are added to this type, update:
* - vg_main.c:initialisation of VG_(needs)
* - vg_main.c:sanity_check_needs()
*
@@ -1111,20 +1136,11 @@
*/
typedef
struct {
- /* Name and description used in the startup message. `name' also
- determines the string used for identifying suppressions in a
- suppression file as belonging to this skin. `bug_reports_to'
- (should be an email address) is printed if an `sk_assert' assertion
- fails or VG_(skin_panic) is called. */
- Char* name;
- Char* description;
- Char* bug_reports_to;
-
/* Booleans that decide core behaviour, but don't require extra
operations to be defined if `True' */
/* Should __libc_freeres() be run? Bugs in it can crash the skin. */
- Bool run_libc_freeres;
+ Bool libc_freeres;
/* Want to have errors detected by Valgrind's core reported? Includes:
- pthread API errors (many; eg. unlocking a non-locked mutex)
@@ -1269,16 +1285,17 @@
/* Fundamental template functions */
/* Initialise skin. Must do the following:
- - initialise the 'needs' struct
+ - initialise the `details' struct
- register any helpers called by generated code
May do the following:
- - indicate events to track by initialising part or all of the 'track'
- struct
+ - initialise the `needs' struct to indicate certain requirements
+ - initialise the `track' struct to indicate core events of interest
- register any skin-specific profiling events
- any other skin-specific initialisation
*/
-extern void SK_(pre_clo_init) ( VgNeeds* needs, VgTrackEvents* track );
+extern void SK_(pre_clo_init) ( VgDetails* details, VgNeeds* needs,
+ VgTrackEvents* track );
/* Do initialisation that can only be done after command line processing. */
extern void SK_(post_clo_init)( void );