]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove dead code relating to interface versions.
authorNicholas Nethercote <njn@valgrind.org>
Fri, 27 Feb 2009 03:38:28 +0000 (03:38 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 27 Feb 2009 03:38:28 +0000 (03:38 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9289

callgrind/dump.c
coregrind/m_main.c
include/pub_tool_libcproc.h
include/pub_tool_tooliface.h

index 27257019f4ae4b7a34ca411e55f83081694dae24..3ae31f3afc0260df2f19e603e375145623a518a3 100644 (file)
@@ -1640,7 +1640,6 @@ void init_cmdbuf(void)
   Int i,j,size = 0;
   HChar* argv;
 
-#if VG_CORE_INTERFACE_VERSION > 8
   if (VG_(args_the_exename))
       size = VG_(sprintf)(cmdbuf, " %s", VG_(args_the_exename));
 
@@ -1651,15 +1650,6 @@ void init_cmdbuf(void)
       for(j=0;argv[j]!=0;j++)
          if (size < BUF_LEN) cmdbuf[size++] = argv[j];
   }
-#else
-  for(i = 0; i < VG_(client_argc); i++) {
-    argv = VG_(client_argv)[i];
-    if (!argv) continue;
-    if ((size>0) && (size < BUF_LEN)) cmdbuf[size++] = ' ';
-    for(j=0;argv[j]!=0;j++)
-      if (size < BUF_LEN) cmdbuf[size++] = argv[j];
-  }
-#endif
 
   if (size == BUF_LEN) size--;
   cmdbuf[size] = 0;
index f8258d4157f012c0ce74c917ae09709848f3239e..4cf70b614fe17348665763cde13714ddb7d379a8 100644 (file)
@@ -1585,7 +1585,7 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp )
    //   p: setup_file_descriptors()  [for 'VG_(fd_xxx_limit)']
    //--------------------------------------------------------------
    VG_(debugLog)(1, "main", "Initialise the tool part 1 (pre_clo_init)\n");
-   (VG_(tool_info).tl_pre_clo_init)();
+   VG_(tl_pre_clo_init)();
 
    //--------------------------------------------------------------
    // If --tool and --help/--help-debug was given, now give the core+tool
index f0f7cfca75f2ae7ac9312ca9f33a181d2eec85f1..8b44a59125fa6b20572aa1ed01a421a368951174 100644 (file)
@@ -35,9 +35,7 @@
    Command-line and environment stuff
    ------------------------------------------------------------------ */
 
-/* Client args and environment.  Note that VG_(client_argv)[] can be written
-   to by the client, so you should check each entry is non-NULL before
-   printing.  VG_(client_envp) can be inspected with VG_(getenv)(). */
+/* Client environment. */
 extern Char** VG_(client_envp);
 
 /* Looks up VG_(client_envp) */
index 10c9a855faf518219327de4415fe08a39c376c50..7ab042e0a18b439f9186c236877bdf9d1dd31fe0 100644 (file)
 /* ------------------------------------------------------------------ */
 /* The interface version */
 
-/* The version number indicates binary-incompatible changes to the
-   interface;  if the core and tool versions don't match, Valgrind
-   will abort.  */
-#define VG_CORE_INTERFACE_VERSION   11
-
-typedef struct _ToolInfo {
-   Int sizeof_ToolInfo;
-   Int interface_version;
-
-   /* Initialise tool.   Must do the following:
-      - initialise the `details' struct, via the VG_(details_*)() functions
-      - register any helpers called by generated code
-      
-      May do the following:
-      - initialise the `needs' struct to indicate certain requirements, via
-      the VG_(needs_*)() functions
-      - initialize all the tool's entrypoints via the VG_(init_*)() functions
-      - register any tool-specific profiling events
-      - any other tool-specific initialisation
-   */
-   void (*tl_pre_clo_init) ( void );
-} ToolInfo;
-
-extern const ToolInfo VG_(tool_info);
-
-/* Every tool must include this macro somewhere, exactly once. */
-#define VG_DETERMINE_INTERFACE_VERSION(pre_clo_init)           \
-   const ToolInfo VG_(tool_info) = {                           \
-      .sizeof_ToolInfo   = sizeof(ToolInfo),                   \
-      .interface_version = VG_CORE_INTERFACE_VERSION,          \
-      .tl_pre_clo_init   = pre_clo_init,                       \
-   };
+/* Initialise tool.   Must do the following:
+   - initialise the `details' struct, via the VG_(details_*)() functions
+   - register the basic tool functions, via VG_(basic_tool_funcs)().
+   May do the following:
+   - initialise the `needs' struct to indicate certain requirements, via
+     the VG_(needs_*)() functions
+   - any other tool-specific initialisation
+*/
+extern void (*VG_(tl_pre_clo_init)) ( void );
+
+/* Every tool must include this macro somewhere, exactly once.  The
+   interface version is no longer relevant, but we kept the same name
+   to avoid requiring changes to tools.
+*/
+#define VG_DETERMINE_INTERFACE_VERSION(pre_clo_init) \
+   void (*VG_(tl_pre_clo_init)) ( void ) = pre_clo_init;
 
 /* ------------------------------------------------------------------ */
 /* Basic tool functions */