]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Changed startup message to give information about skin and core separately.
authorNicholas Nethercote <njn@valgrind.org>
Thu, 3 Oct 2002 14:05:52 +0000 (14:05 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Thu, 3 Oct 2002 14:05:52 +0000 (14:05 +0000)
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

16 files changed:
addrcheck/ac_main.c
cachegrind/cg_main.c
corecheck/cc_main.c
coregrind/docs/skins.html
coregrind/vg_default.c
coregrind/vg_errcontext.c
coregrind/vg_main.c
coregrind/vg_mylibc.c
coregrind/vg_scheduler.c
example/ex_main.c
helgrind/hg_main.c
include/vg_skin.h
lackey/lk_main.c
memcheck/mc_main.c
none/nl_main.c
tests/filter_stderr_basic

index e2e8e3f8b55ae60ed7d66ff1c122c421bd64c3b0..3063b1a0ff2aa3667de72280b007d8f2a29ff45d 100644 (file)
@@ -2515,33 +2515,28 @@ Char* SK_(usage)(void)
 /*--- Setup                                                ---*/
 /*------------------------------------------------------------*/
 
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track)
-{
-   needs->name                    = "addrcheck";
-   needs->description             = "a fine-grained address checker";
-   needs->bug_reports_to          = "jseward@acm.org";
-
-   needs->core_errors             = True;
-   needs->skin_errors             = True;
-   needs->run_libc_freeres        = True;
-
-   needs->sizeof_shadow_block     = 1;
-
-   needs->basic_block_discards    = False;
-   needs->shadow_regs             = False;
-   needs->command_line_options    = True;
-   needs->client_requests         = True;
-   needs->extended_UCode          = False;
-   needs->syscall_wrapper         = True;
-   needs->alternative_free        = True;
-   needs->sanity_checks           = True;
-
-   VG_(register_compact_helper)((Addr) & SK_(helperc_ACCESS4));
-   VG_(register_compact_helper)((Addr) & SK_(helperc_ACCESS2));
-   VG_(register_compact_helper)((Addr) & SK_(helperc_ACCESS1));
-   VG_(register_compact_helper)((Addr) & SK_(fpu_ACCESS_check));
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* needs, VgTrackEvents* track)
+{
+   details->name             = "addrcheck";
+   details->version          = NULL;
+   details->description      = "a fine-grained address checker";
+   details->copyright_author =
+      "Copyright (C) 2002, and GNU GPL'd, by Julian Seward.";
+   details->bug_reports_to   = "jseward@acm.org";
+
+   needs->core_errors          = True;
+   needs->skin_errors          = True;
+   needs->libc_freeres         = True;
+   needs->sizeof_shadow_block  = 1;
+   needs->basic_block_discards = False;
+   needs->shadow_regs          = False;
+   needs->command_line_options = True;
+   needs->client_requests      = True;
+   needs->extended_UCode       = False;
+   needs->syscall_wrapper      = True;
+   needs->alternative_free     = True;
+   needs->sanity_checks        = True;
 
-   /* Events to track */
    track->new_mem_startup       = & addrcheck_new_mem_startup;
    track->new_mem_heap          = & addrcheck_new_mem_heap;
    track->new_mem_stack         = & SK_(make_accessible);
@@ -2572,12 +2567,16 @@ void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track)
    track->pre_mem_write         = & check_is_writable;
    track->post_mem_write        = & SK_(make_accessible);
 
-   init_shadow_memory();
-
-   init_prof_mem();
+   VG_(register_compact_helper)((Addr) & SK_(helperc_ACCESS4));
+   VG_(register_compact_helper)((Addr) & SK_(helperc_ACCESS2));
+   VG_(register_compact_helper)((Addr) & SK_(helperc_ACCESS1));
+   VG_(register_compact_helper)((Addr) & SK_(fpu_ACCESS_check));
 
    VGP_(register_profile_event) ( VgpSetMem,   "set-mem-perms" );
    VGP_(register_profile_event) ( VgpCheckMem, "check-mem-perms" );
+
+   init_shadow_memory();
+   init_prof_mem();
 }
 
 /*--------------------------------------------------------------------*/
index 13450d936b1738dc3355c41ec34e135ad87149a5..fbbcc5ea79d850681d07e4bc2bbb871c633de3fe 100644 (file)
@@ -1922,14 +1922,18 @@ Char* SK_(usage)(void)
 /*--- Setup                                                        ---*/
 /*--------------------------------------------------------------------*/
 
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* not_used) 
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* needs,
+                       VgTrackEvents* not_used)
 {
-   needs->name                    = "cachegrind";
-   needs->description             = "an I1/D1/L2 cache profiler";
-   needs->bug_reports_to          = "njn25@cam.ac.uk";
-
-   needs->basic_block_discards    = True;
-   needs->command_line_options    = True;
+   details->name             = "cachegrind";
+   details->version          = NULL;
+   details->description      = "an I1/D1/L2 cache profiler";
+   details->copyright_author =
+      "Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.";
+   details->bug_reports_to   = "njn25@cam.ac.uk";
+
+   needs->basic_block_discards = True;
+   needs->command_line_options = True;
 
    VG_(register_compact_helper)((Addr) & log_1I_0D_cache_access);
    VG_(register_compact_helper)((Addr) & log_1I_0D_cache_access_JIFZ);
index 5ac657ae0ad49954deb09bb37aab0cfdd50d113b..7bfc910d75c13a6705ccef2895f72a22832d35a7 100644 (file)
 #include "vg_skin.h"
 
 
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track) 
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* needs, VgTrackEvents* track)
 {
-   needs->name           = "coregrind";
-   needs->description    = "a rudimentary error detector";
-   needs->bug_reports_to = "njn25@cam.ac.uk";
-
-   needs->core_errors    = True;
+   details->name             = "coregrind";
+   details->version          = NULL;
+   details->description      = "a rudimentary error detector";
+   details->copyright_author =
+      "Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.";
+   details->bug_reports_to   = "njn25@cam.ac.uk";
+
+   needs->core_errors = True;
 
    /* No core events to track */
 }
index 6e69534104cb827de2229e9079cbf73aa66801e9..fb92a745714a47d32b56a64bfb90e18cf4767718 100644 (file)
@@ -285,12 +285,10 @@ In what follows, all filenames are relative to Valgrind's top-level directory
 
   <li>Copy <code>example/ex_main.c</code> into
       <code>foobar/</code>, renaming it as <code>fb_main.c</code>.
-      Edit it by changing the two lines in <code>SK_(pre_clo_init)()</code> to:
-      <pre>
-    needs->name        = "foobar";
-    needs->description = "a foobarring tool";</pre>
-
-      (setting <code>needs->description</code> appropriately).
+      Edit it by changing the five lines in <code>SK_(pre_clo_init)()</code>
+      to something appropriate for the skin.  These fields are used in the
+      startup message, except for <code>bug_reports_to</code> which is used
+      if a skin assertion fails.
   </li><p>
 
   <li>Edit <code>Makefile.am</code>, adding the new directory
@@ -320,7 +318,9 @@ In what follows, all filenames are relative to Valgrind's top-level directory
       (almost any program should work; <code>date</code> is just an example).  
       The output should be something like this:
       <pre>
-==738== foobar-1.1.0, a foobarring tool for x86 GNU/Linux.
+==738== foobar-0.0.1, a foobarring tool for x86-linux.
+==738== Copyright (C) 2002, and GNU GPL'd, by J. Random Hacker.
+==738== Built with valgrind-1.1.0, a program execution monitor.
 ==738== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
 ==738== Estimated CPU clock rate is 1400 MHz
 ==738== For more details, rerun with: -v
index 1bbcd2a48ccc08c1728184fe14e37b65f0ab9d56..3585f656f6a31bd4f922cdd91156261f3e8d67e6 100644 (file)
@@ -71,7 +71,7 @@ void non_fund_panic ( Char* fn )
    ------------------------------------------------------------------ */
 
 __attribute__ ((weak))
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track)
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* needs, VgTrackEvents* track)
 {
    fund_panic("SK_(pre_clo_init)");
 }
index f0d126bc31c25f18c500dcf1241462d87c022b14..af447efd04839771330650d01954f0a9316bb731 100644 (file)
@@ -583,7 +583,7 @@ static void load_one_suppressions_file ( Char* filename )
       }
 
       /* Is it a skin suppression?  (<skin_name>:<supp_name>") */
-      else if (VG_(needs).skin_errors && STREQ(skin_name, VG_(needs).name))
+      else if (VG_(needs).skin_errors && STREQ(skin_name, VG_(details).name))
       {
          if (SK_(recognised_suppression)(supp_name, & supp->skin_supp.skind)) 
          {
index 6c628c46cf932d60198f8464ea989627c88997cc..cb5891ed14bc484ee573fa559246110e180168d9 100644 (file)
@@ -438,25 +438,27 @@ UInt VG_(num_scheduling_events_MAJOR) = 0;
    ------------------------------------------------------------------ */
 
 /* Init with default values. */
+VgDetails VG_(details) = {
+   .name             = NULL,
+   .version          = NULL,
+   .description      = NULL,
+   .copyright_author = NULL,
+   .bug_reports_to   = NULL,
+};
+
 VgNeeds VG_(needs) = {
-   .name                    = NULL,
-   .description             = NULL,
-   .bug_reports_to          = NULL,
-
-   .core_errors             = False,
-   .skin_errors             = False,
-   .run_libc_freeres        = False,
-
-   .sizeof_shadow_block     = 0,
-
-   .basic_block_discards    = False,
-   .shadow_regs             = False,
-   .command_line_options    = False,
-   .client_requests         = False,
-   .extended_UCode          = False,
-   .syscall_wrapper         = False,
-   .alternative_free        = False,
-   .sanity_checks           = False,
+   .core_errors          = False,
+   .skin_errors          = False,
+   .libc_freeres         = False,
+   .sizeof_shadow_block  = 0,
+   .basic_block_discards = False,
+   .shadow_regs          = False,
+   .command_line_options = False,
+   .client_requests      = False,
+   .extended_UCode       = False,
+   .syscall_wrapper      = False,
+   .alternative_free     = False,
+   .sanity_checks        = False,
 };
 
 VgTrackEvents VG_(track_events) = {
@@ -470,6 +472,7 @@ VgTrackEvents VG_(track_events) = {
    .new_mem_mmap          = NULL,
 
    .copy_mem_heap         = NULL,
+   .copy_mem_remap        = NULL,
    .change_mem_mprotect   = NULL,
 
    .ban_mem_heap          = NULL,
@@ -490,6 +493,9 @@ VgTrackEvents VG_(track_events) = {
    .pre_mem_write         = NULL,
    .post_mem_write        = NULL,
 
+   /* Scheduler events */
+   .thread_run            = NULL,
+
    /* Mutex events */
    .post_mutex_lock       = NULL,
    .post_mutex_unlock     = NULL,
@@ -504,9 +510,11 @@ static void sanity_check_needs ( void )
       VG_(skin_panic)("Uninitialised needs field\n");       \
    }
    
-   CHECK_NOT(VG_(needs).name,           NULL);
-   CHECK_NOT(VG_(needs).description,    NULL);
-   CHECK_NOT(VG_(needs).bug_reports_to, NULL);
+   CHECK_NOT(VG_(details).name,             NULL);
+   /* Nb: .version can be NULL */
+   CHECK_NOT(VG_(details).description,      NULL);
+   CHECK_NOT(VG_(details).copyright_author, NULL);
+   CHECK_NOT(VG_(details).bug_reports_to,   NULL);
 
 #undef CHECK_NOT
 #undef INVALID_Bool
@@ -644,9 +652,12 @@ static void usage ( void )
 "  Valgrind is Copyright (C) 2000-2002 Julian Seward\n"
 "  and licensed under the GNU General Public License, version 2.\n"
 "  Bug reports, feedback, admiration, abuse, etc, to: %s.\n"
+"\n"
+"  Skins are copyright and licensed by their authors.  See each\n"
+"  skin's start-up message for more information.\n"
 "\n";
 
-   VG_(printf)(usage1, VG_(needs).name);
+   VG_(printf)(usage1, VG_(details).name);
    /* Don't print skin string directly for security, ha! */
    if (VG_(needs).command_line_options)
       VG_(printf)("%s", SK_(usage)());
@@ -998,13 +1009,23 @@ static void process_cmd_line_options ( void )
    VG_(clo_logfile_fd) = eventually_logfile_fd;
 
    if (VG_(clo_verbosity > 0)) {
-      VG_(message)(Vg_UserMsg, "%s-%s, %s for x86 GNU/Linux.",
-         VG_(needs).name, VERSION, VG_(needs).description);
-   }
-
-   if (VG_(clo_verbosity > 0))
+      /* Skin details */
+      VG_(message)(Vg_UserMsg, "%s%s%s, %s for x86-linux.",
+                   VG_(details).name, 
+                   NULL == VG_(details).version ?        "" : "-",
+                   NULL == VG_(details).version 
+                      ? (Char*)"" : VG_(details).version,
+                   VG_(details).description);
+      VG_(message)(Vg_UserMsg, "%s", VG_(details).copyright_author);
+
+      /* Core details */
+      VG_(message)(Vg_UserMsg,
+                   "Built with valgrind-%s, a program execution monitor.",
+                   VERSION);
       VG_(message)(Vg_UserMsg, 
                    "Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.");
+   }
+
    if (VG_(clo_verbosity) > 1) {
       VG_(message)(Vg_UserMsg, "Startup, with flags:");
       for (i = 0; i < argc; i++) {
@@ -1181,7 +1202,7 @@ void VG_(main) ( void )
         and turn on/off 'command_line_options' need
       - init_memory() (to setup memory event trackers).
     */
-   SK_(pre_clo_init) ( & VG_(needs), & VG_(track_events) );
+   SK_(pre_clo_init) ( & VG_(details), & VG_(needs), & VG_(track_events) );
    sanity_check_needs();
 
    /* Set up baseBlock offsets and copy the saved machine's state into it. */
index d6bb58ced6ca1a92df44b9af9edbe1f5401e175a..c6c158c6ff3e35a64f9c09ba2d9e2c016e1fdc37 100644 (file)
@@ -1008,7 +1008,7 @@ static void assert_fail ( Char* expr, Char* name, Char* report,
 
 void VG_(skin_assert_fail) ( Char* expr, Char* file, Int line, Char* fn )
 {
-   assert_fail(expr, VG_(needs).name, VG_(needs).bug_reports_to, 
+   assert_fail(expr, VG_(details).name, VG_(details).bug_reports_to, 
                file, line, fn);
 }
 
@@ -1032,7 +1032,7 @@ void VG_(core_panic) ( Char* str )
 
 void VG_(skin_panic) ( Char* str )
 {
-   panic(VG_(needs).name, VG_(needs).bug_reports_to, str);
+   panic(VG_(details).name, VG_(details).bug_reports_to, str);
 }
 
 /* ---------------------------------------------------------------------
index c465ab67dd2462361ae82812795299c1ec87da6b..c3eaef30458aecdf7b8753908979e7436ec9a623 100644 (file)
@@ -1484,7 +1484,7 @@ VgSchedReturnCode VG_(scheduler) ( void )
                VG_(exitcode) = VG_(threads)[tid].m_ebx; /* syscall arg1 */
 
             if (VG_(threads)[tid].m_eax == __NR_exit 
-                && ! VG_(needs).run_libc_freeres) {
+                && ! VG_(needs).libc_freeres) {
                if (VG_(clo_trace_syscalls) || VG_(clo_trace_sched)) {
                   VG_(message)(Vg_DebugMsg, 
                      "Caught __NR_exit; quitting");
@@ -1493,7 +1493,7 @@ VgSchedReturnCode VG_(scheduler) ( void )
             }
 
             if (VG_(threads)[tid].m_eax == __NR_exit) {
-               vg_assert(VG_(needs).run_libc_freeres);
+               vg_assert(VG_(needs).libc_freeres);
                if (0 || VG_(clo_trace_syscalls) || VG_(clo_trace_sched)) {
                   VG_(message)(Vg_DebugMsg, 
                      "Caught __NR_exit; running __libc_freeres()");
index d3316b0d50395e8bf4e40a6b7b93ba5855195cc7..1f3fe69e230c642e9583a9884f26d3aaca80b9a4 100644 (file)
@@ -5,11 +5,16 @@
 
 #include "vg_skin.h"
 
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track) 
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* needs, VgTrackEvents* track)
 {
-   needs->name           = "example";
-   needs->description    = "an example Valgrind skin";
-   needs->report_bugs_to = "santa.claus@northpole.org";
+   details->name             = "example";
+   details->version          = "0.0.1";
+   details->description      = "an example Valgrind skin";
+   details->copyright_author =
+      "Copyright (C) 2002, and put in the public domain, by Santa Claus.";
+   details->bug_reports_to   = "santa.claus@northpole.org";
+
+   /* No needs, no core events to track */
 }
 
 void SK_(post_clo_init)(void)
index b53a2bea9d6b2fe281a48ac3e1bad017d1632995..f824be9d73d13c89cb3c0d5f0aa3d6957ce10929 100644 (file)
@@ -1338,21 +1338,20 @@ static void eraser_mem_write(Addr a, UInt size)
 /*--- Setup                                                        ---*/
 /*--------------------------------------------------------------------*/
 
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track)
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* needs, VgTrackEvents* track)
 {
    Int i;
 
-   needs->name                    = "helgrind";
-   needs->description             = "a data race detector";
-   needs->description             = "njn25@cam.ac.uk";
+   details->name             = "helgrind";
+   details->version          = NULL;
+   details->description      = "a data race detector";
+   details->copyright_author =
+      "Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.";
+   details->bug_reports_to   = "njn25@cam.ac.uk";
 
-   needs->core_errors             = True;
-   needs->skin_errors             = True;
+   needs->core_errors = True;
+   needs->skin_errors = True;
 
-   VG_(register_compact_helper)((Addr) & eraser_mem_read);
-   VG_(register_compact_helper)((Addr) & eraser_mem_write);
-
-   /* Events to track */
    track->new_mem_startup       = & eraser_new_mem_startup;
    track->new_mem_heap          = & eraser_new_mem_heap;
    track->new_mem_stack         = & make_writable;
@@ -1382,6 +1381,9 @@ void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track)
    track->post_mutex_lock       = & eraser_post_mutex_lock;
    track->post_mutex_unlock     = & eraser_post_mutex_unlock;
 
+   VG_(register_compact_helper)((Addr) & eraser_mem_read);
+   VG_(register_compact_helper)((Addr) & eraser_mem_write);
+
    /* Init lock table */
    for (i = 0; i < VG_N_THREADS; i++) 
       thread_locks[i] = 0 /* the empty lock set */;
index 8c9d077ad2b3e1c995956b92847316b48d1ffb20..530e1132eca73bc63d4e3dded06404b285adbdbe 100644 (file)
@@ -1100,9 +1100,34 @@ extern ThreadId VG_(any_matching_thread_stack)
 /*=== 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 @@ extern ThreadId VG_(any_matching_thread_stack)
  */
 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 @@ extern VgTrackEvents VG_(track_events);
 /* 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 );
index 5a22152c41936dcd6eb6ab8d02c86085d2e24009..6679541e3a2f19686ff4cca9b764d8d85edbc77b 100644 (file)
@@ -75,11 +75,15 @@ static void add_one_Jcc_untaken(void)
    n_Jccs_untaken++;
 }
 
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* not_used)
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* not_used1,
+                       VgTrackEvents* not_used2)
 {
-   needs->name           = "lackey";
-   needs->description    = "an example Valgrind skin";
-   needs->bug_reports_to = "njn25@cam.ac.uk";
+   details->name             = "lackey";
+   details->version          = NULL;
+   details->description      = "an example Valgrind skin";
+   details->copyright_author =
+      "Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.";
+   details->bug_reports_to   = "njn25@cam.ac.uk";
 
    VG_(register_compact_helper)((Addr) & add_one_dlrr_call);
    VG_(register_compact_helper)((Addr) & add_one_BB);
index a4ff6dde37bd3b306294ad940b1fb9385b8fbd57..c6ddc142e064fe2132c928d52a02a7a2b75b3614 100644 (file)
@@ -2349,43 +2349,28 @@ Char* SK_(usage)(void)
 /*--- Setup                                                ---*/
 /*------------------------------------------------------------*/
 
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track)
-{
-   needs->name                    = "memcheck";
-   needs->description             = "a memory error detector";
-   needs->bug_reports_to          = "jseward@acm.org";
-
-   needs->core_errors             = True;
-   needs->skin_errors             = True;
-   needs->run_libc_freeres        = True;
-
-   needs->sizeof_shadow_block     = 1;
-
-   needs->basic_block_discards    = False;
-   needs->shadow_regs             = True;
-   needs->command_line_options    = True;
-   needs->client_requests         = True;
-   needs->extended_UCode          = True;
-   needs->syscall_wrapper         = True;
-   needs->alternative_free        = True;
-   needs->sanity_checks           = True;
-
-   VG_(register_compact_helper)((Addr) & SK_(helper_value_check4_fail));
-   VG_(register_compact_helper)((Addr) & SK_(helper_value_check0_fail));
-   VG_(register_compact_helper)((Addr) & SK_(helper_value_check2_fail));
-   VG_(register_compact_helper)((Addr) & SK_(helperc_STOREV4));
-   VG_(register_compact_helper)((Addr) & SK_(helperc_STOREV1));
-   VG_(register_compact_helper)((Addr) & SK_(helperc_LOADV4));
-   VG_(register_compact_helper)((Addr) & SK_(helperc_LOADV1));
-
-   /* These two made non-compact because 2-byte transactions are rare. */
-   VG_(register_noncompact_helper)((Addr) & SK_(helperc_STOREV2));
-   VG_(register_noncompact_helper)((Addr) & SK_(helperc_LOADV2));
-   VG_(register_noncompact_helper)((Addr) & SK_(fpu_write_check));
-   VG_(register_noncompact_helper)((Addr) & SK_(fpu_read_check));
-   VG_(register_noncompact_helper)((Addr) & SK_(helper_value_check1_fail));
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* needs, VgTrackEvents* track)
+{
+   details->name             = "memcheck";
+   details->version          = NULL;
+   details->description      = "a memory error detector";
+   details->copyright_author =
+      "Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.";
+   details->bug_reports_to   = "jseward@acm.org";
+
+   needs->core_errors          = True;
+   needs->skin_errors          = True;
+   needs->libc_freeres         = True;
+   needs->sizeof_shadow_block  = 1;
+   needs->basic_block_discards = False;
+   needs->shadow_regs          = True;
+   needs->command_line_options = True;
+   needs->client_requests      = True;
+   needs->extended_UCode       = True;
+   needs->syscall_wrapper      = True;
+   needs->alternative_free     = True;
+   needs->sanity_checks        = True;
 
-   /* Events to track */
    track->new_mem_startup       = & memcheck_new_mem_startup;
    track->new_mem_heap          = & memcheck_new_mem_heap;
    track->new_mem_stack         = & SK_(make_writable);
@@ -2416,12 +2401,26 @@ void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track)
    track->pre_mem_write         = & check_is_writable;
    track->post_mem_write        = & SK_(make_readable);
 
-   init_shadow_memory();
+   VG_(register_compact_helper)((Addr) & SK_(helper_value_check4_fail));
+   VG_(register_compact_helper)((Addr) & SK_(helper_value_check0_fail));
+   VG_(register_compact_helper)((Addr) & SK_(helper_value_check2_fail));
+   VG_(register_compact_helper)((Addr) & SK_(helperc_STOREV4));
+   VG_(register_compact_helper)((Addr) & SK_(helperc_STOREV1));
+   VG_(register_compact_helper)((Addr) & SK_(helperc_LOADV4));
+   VG_(register_compact_helper)((Addr) & SK_(helperc_LOADV1));
 
-   init_prof_mem();
+   /* These two made non-compact because 2-byte transactions are rare. */
+   VG_(register_noncompact_helper)((Addr) & SK_(helperc_STOREV2));
+   VG_(register_noncompact_helper)((Addr) & SK_(helperc_LOADV2));
+   VG_(register_noncompact_helper)((Addr) & SK_(fpu_write_check));
+   VG_(register_noncompact_helper)((Addr) & SK_(fpu_read_check));
+   VG_(register_noncompact_helper)((Addr) & SK_(helper_value_check1_fail));
 
    VGP_(register_profile_event) ( VgpSetMem,   "set-mem-perms" );
    VGP_(register_profile_event) ( VgpCheckMem, "check-mem-perms" );
+
+   init_shadow_memory();
+   init_prof_mem();
 }
 
 /*--------------------------------------------------------------------*/
index cbc1292bb898fb26536d7411ab1e33a99a1e594d..e2d2db2c9814d2f07ce8d1c6912a388829bd8a3d 100644 (file)
 #include "vg_skin.h"
 
 
-void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track) 
+void SK_(pre_clo_init)(VgDetails* details, VgNeeds* not_used1,
+                       VgTrackEvents* not_used2) 
 {
-   needs->name           = "nulgrind";
-   needs->description    = "a binary JIT-compiler";
-   needs->bug_reports_to = "njn25@cam.ac.uk";
+   details->name             = "nulgrind";
+   details->version          = NULL;
+   details->description      = "a binary JIT-compiler";
+   details->copyright_author =
+      "Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.";
+   details->bug_reports_to   = "njn25@cam.ac.uk";
 
    /* No needs, no core events to track */
 }
index fa2bea9bba955df18e1f2d8c1b8e43502aca76ae..398ce6368d4df5cd1c2ab736a8c93d0b5cc5b804 100755 (executable)
@@ -4,12 +4,14 @@
 # startup stuff and pid numbers.
 
 # Remove ==pid== and --pid-- and ++pid++ strings 
-sed "s/\(==\|--\|++\)[0-9]\{3,5\}\1 //"                                 |
+sed "s/\(==\|--\|++\)[0-9]\{3,5\}\1 //"                                |
 
-# Remove "<name>, a <description> for x86 GNU/Linux." line
-sed "/^.*, .* for x86 GNU\/Linux\./d"                                  | 
+# Remove "<name>, a <description> for x86-linux." line and the following
+# copyright notice line
+sed "/^.*, .* for x86-linux\./ , /./ d"                                | 
 
 # Remove other introductory lines
+sed "/Built with valgrind-.*, a program execution monitor./d"          |
 sed "/Copyright (C) 2000-2..., and GNU GPL'd, by Julian Seward\./d"    |
 sed "/Estimated CPU clock rate is [0-9]\+ MHz/d"                       |
 sed "/For more details, rerun with: -v/d"