|
From: <sv...@va...> - 2009-02-27 03:40:21
|
Author: njn
Date: 2009-02-27 03:38:28 +0000 (Fri, 27 Feb 2009)
New Revision: 9289
Log:
Remove dead code relating to interface versions.
Modified:
trunk/callgrind/dump.c
trunk/coregrind/m_main.c
trunk/include/pub_tool_libcproc.h
trunk/include/pub_tool_tooliface.h
Modified: trunk/callgrind/dump.c
===================================================================
--- trunk/callgrind/dump.c 2009-02-27 03:23:42 UTC (rev 9288)
+++ trunk/callgrind/dump.c 2009-02-27 03:38:28 UTC (rev 9289)
@@ -1640,7 +1640,6 @@
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 @@
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;
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2009-02-27 03:23:42 UTC (rev 9288)
+++ trunk/coregrind/m_main.c 2009-02-27 03:38:28 UTC (rev 9289)
@@ -1585,7 +1585,7 @@
// 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
Modified: trunk/include/pub_tool_libcproc.h
===================================================================
--- trunk/include/pub_tool_libcproc.h 2009-02-27 03:23:42 UTC (rev 9288)
+++ trunk/include/pub_tool_libcproc.h 2009-02-27 03:38:28 UTC (rev 9289)
@@ -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) */
Modified: trunk/include/pub_tool_tooliface.h
===================================================================
--- trunk/include/pub_tool_tooliface.h 2009-02-27 03:23:42 UTC (rev 9288)
+++ trunk/include/pub_tool_tooliface.h 2009-02-27 03:38:28 UTC (rev 9289)
@@ -37,39 +37,23 @@
/* ------------------------------------------------------------------ */
/* 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
+/* 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 );
-typedef struct _ToolInfo {
- Int sizeof_ToolInfo;
- Int interface_version;
+/* 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;
- /* 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, \
- };
-
/* ------------------------------------------------------------------ */
/* Basic tool functions */
|