nothing that will affect code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2217
Julian Seward, jseward@acm.org, is the main author.
Nicholas Nethercote, njn25@cam.ac.uk, did the core/tool
-generalisation, and wrote Cachegrind and some of the other skins.
+generalisation, and wrote Cachegrind and some of the other tools.
Jeremy Fitzhardinge, jeremy@goop.org, wrote much of Helgrind, and lots
of low-level syscall/signal stuff.
VgpCacheSimulate,
VgpCacheResults
}
- VgpSkinCC;
+ VgpToolCC;
/*------------------------------------------------------------*/
/*--- Output file related stuff ---*/
}
/* Second top-level entry point to the error management subsystem, for
- errors that the skin want to report immediately, eg. because they're
+ errors that the tool wants to report immediately, eg. because they're
guaranteed to only happen once. This avoids all the recording and
comparing stuff. But they can be suppressed; returns True if it is
suppressed. Bool `print_error' dictates whether to print the error.
}
-/* Look for "skin" in a string like "skin1,skin2,skin3" */
+/* Look for "tool" in a string like "tool1,tool2,tool3" */
static __inline__
-Bool skin_name_present(Char *name, Char *names)
+Bool tool_name_present(Char *name, Char *names)
{
Bool found;
Char *s = NULL; /* Shut gcc up */
Int fd, i;
Bool eof;
Char buf[N_BUF+1];
- Char* skin_names;
+ Char* tool_names;
Char* supp_name;
fd = VG_(open)( filename, VKI_O_RDONLY, 0 );
}
while (True) {
- /* Assign and initialise the two suppression halves (core and skin) */
+ /* Assign and initialise the two suppression halves (core and tool) */
Supp* supp;
supp = VG_(arena_malloc)(VG_AR_CORE, sizeof(Supp));
supp->count = 0;
}
buf[i] = '\0'; /* Replace ':', splitting into two strings */
- skin_names = & buf[0];
+ tool_names = & buf[0];
supp_name = & buf[i+1];
/* Is it a core suppression? */
- if (VG_(needs).core_errors && skin_name_present("core", skin_names))
+ if (VG_(needs).core_errors && tool_name_present("core", tool_names))
{
if (VG_STREQ(supp_name, "PThread"))
supp->skind = PThreadSupp;
goto syntax_error;
}
- /* Is it a skin suppression? */
+ /* Is it a tool suppression? */
else if (VG_(needs).skin_errors &&
- skin_name_present(VG_(details).name, skin_names))
+ tool_name_present(VG_(details).name, tool_names))
{
if (SK_(recognised_suppression)(supp_name, supp))
{
/* Use a checked red zone size of 1 word for our internal stuff,
and an unchecked zone of arbitrary size for the client. Of
- course the client's red zone can be checked by the skin, eg.
+ course the client's red zone can be checked by the tool, eg.
by using addressibility maps, but not by the mechanism implemented
here, which merely checks at the time of freeing that the red
zone words are unchanged. */
arena_init ( &vg_arena[VG_AR_CORE], "core", 1, True, 262144, False );
- arena_init ( &vg_arena[VG_AR_SKIN], "skin", 1, True, 262144, False );
+ arena_init ( &vg_arena[VG_AR_SKIN], "tool", 1, True, 262144, False );
arena_init ( &vg_arena[VG_AR_SYMTAB], "symtab", 1, True, 262144, False );
/*--- Skin-visible functions. ---*/
/*------------------------------------------------------------*/
-/* All just wrappers to avoid exposing arenas to skins */
+/* All just wrappers to avoid exposing arenas to tools */
void* VG_(malloc) ( Int nbytes )
{
return res;
}
-/* Wrapper to avoid exposing skins to ArenaId's */
+/* Wrapper to avoid exposing tools to ArenaId's */
Char* VG_(strdup) ( const Char* s )
{
return VG_(arena_strdup) ( VG_AR_SKIN, s );
/*--------------------------------------------------------------------*/
-/*--- Stuff relating to skin data structures. ---*/
+/*--- Stuff relating to tool data structures. ---*/
/*--- vg_needs.c ---*/
/*--------------------------------------------------------------------*/
/* ---------------------------------------------------------------------
- Skin data structure initialisation
+ Tool data structure initialisation
------------------------------------------------------------------ */
/* Init with default values. */
have no prototypes in vg_include.h, since they are not intended to
be called from within Valgrind.
- This file can be #included into a skin that wishes to know about
+ This file can be #included into a tool that wishes to know about
calls to malloc(). It should define functions SK_(malloc) et al
that will be called.
------------------------------------------------------------------ */
/* If __NR_exit, remember the supplied argument. */
VG_(exitcode) = VG_(threads)[tid].m_ebx; /* syscall arg1 */
- /* Only run __libc_freeres if the skin says it's ok and
+ /* Only run __libc_freeres if the tool says it's ok and
it hasn't been overridden with --run-libc-freeres=no
on the command line. */
break;
}
- /* Note: for skins that replace malloc() et al, we want to call
+ /* Note: for tools that replace malloc() et al, we want to call
the replacement versions. For those that don't, we want to call
VG_(cli_malloc)() et al. We do this by calling SK_(malloc)(), which
- malloc-replacing skins must replace, but have its default definition
+ malloc-replacing tools must replace, but have its default definition
call */
/* Note: for MALLOC and FREE, must set the appropriate "lock"... see
static Bool whined = False;
if (!whined) {
- // Allow for requests in core, but defined by skins, which
+ // Allow for requests in core, but defined by tools, which
// have 0 and 0 in their two high bytes.
Char c1 = (arg[0] >> 24) & 0xff;
Char c2 = (arg[0] >> 16) & 0xff;
"delivering signal %d (%s) to thread %d: on ALT STACK",
sigNo, signame(sigNo), tid );
- /* Signal delivery to skins */
+ /* Signal delivery to tools */
VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/False );
} else {
esp_top_of_frame = tst->m_esp;
- /* Signal delivery to skins */
+ /* Signal delivery to tools */
VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/True );
}
tst->sig_mask = frame->mask;
VG_(proxy_setsigmask)(tid);
- /* Notify skins */
+ /* Notify tools */
VG_TRACK( post_deliver_signal, tid, sigNo );
return sigNo;
is a permissions fault, then it means that the client is
using some memory which had not previously been used.
This catches those faults, makes the memory accessible,
- and calls the skin to initialize that page.
+ and calls the tool to initialize that page.
*/
static Int recursion = 0;
return True;
}
-/* This is available to skins... always demangle C++ names,
+/* This is available to tools... always demangle C++ names,
match anywhere in function, but don't show offsets. */
Bool VG_(get_fnname) ( Addr a, Char* buf, Int nbuf )
{
/*show offset?*/False );
}
-/* This is available to skins... always demangle C++ names,
+/* This is available to tools... always demangle C++ names,
match anywhere in function, and show offset if nonzero. */
Bool VG_(get_fnname_w_offset) ( Addr a, Char* buf, Int nbuf )
{
/*show offset?*/True );
}
-/* This is available to skins... always demangle C++ names,
+/* This is available to tools... always demangle C++ names,
only succeed if 'a' matches first instruction of function,
and don't show offsets. */
Bool VG_(get_fnname_if_entry) ( Addr a, Char* buf, Int nbuf )
else
bufsz *= 2;
- /* use skin malloc so that the skin client can free it */
+ /* use tool malloc so that the skin client can free it */
n = VG_(malloc)(bufsz);
if (buf != NULL && bufidx != 0)
VG_(memcpy)(n, buf, bufidx);
* in the basic block. For them we patch in the x86 instruction size
* into the `extra4b' field of the basic-block-ending JMP.
*
- * The INCEIPs and JMP.extra4b fields allows a skin to track x86
- * instruction sizes, important for some skins (eg. cache simulation).
+ * The INCEIPs and JMP.extra4b fields allows a tool to track x86
+ * instruction sizes, important for some tools (eg. Cachegrind).
*/
if (VG_(clo_single_step)) {
eip = disInstr ( cb, eip, &isEnd );
Valgrind's output to /dev/null and still count errors. */
VG_USERREQ__COUNT_ERRORS = 0x1201,
- /* These are useful and can be interpreted by any skin that tracks
+ /* These are useful and can be interpreted by any tool that tracks
malloc() et al, by using vg_replace_malloc.c. */
VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
VG_USERREQ__FREELIKE_BLOCK = 0x1302,
})
-/* Counts the number of errors that have been recorded by a skin. Nb:
- the skin must record the errors with VG_(maybe_record_error)() or
+/* Counts the number of errors that have been recorded by a tool. Nb:
+ the tool must record the errors with VG_(maybe_record_error)() or
VG_(unique_error)() for them to be counted. */
#define VALGRIND_COUNT_ERRORS \
({unsigned int _qyy_res; \
/*--------------------------------------------------------------------*/
-/*--- Profiling machinery. #include this file into a skin to ---*/
-/*--- enable --profile=yes, but not for release versions of skins, ---*/
+/*--- Profiling machinery. #include this file into a tool to ---*/
+/*--- enable --profile=yes, but not for release versions of tools, ---*/
/*--- because it uses glibc code. ---*/
/*--- vg_profile.c ---*/
/*--------------------------------------------------------------------*/
if (vgp_names[n] != NULL) {
VG_(printf)("\nProfile event #%d being registered as `%s'\n"
"already registered as `%s'.\n"
- "Note that skin and core event numbers must not overlap.\n",
+ "Note that tool and core event numbers must not overlap.\n",
n, name, vgp_names[n]);
VG_(skin_panic)("profile event already registered");
}
/* We want a 16B redzone on heap blocks for Addrcheck and Memcheck */
UInt VG_(vg_malloc_redzone_szB) = 16;
-/* Function pointers for the two skins to track interesting events. */
+/* Function pointers for the two tools to track interesting events. */
void (*MAC_(new_mem_heap)) ( Addr a, UInt len, Bool is_inited ) = NULL;
void (*MAC_(ban_mem_heap)) ( Addr a, UInt len ) = NULL;
void (*MAC_(die_mem_heap)) ( Addr a, UInt len ) = NULL;
MAC_Chunk;
/*------------------------------------------------------------*/
-/*--- Profiling of skins and memory events ---*/
+/*--- Profiling of tools and memory events ---*/
/*------------------------------------------------------------*/
typedef
VgpSetMem,
VgpESPAdj
}
- VgpSkinCC;
+ VgpToolCC;
/* Define to collect detailed performance info. */
/* #define MAC_PROFILE_MEMORY */
/* For tracking malloc'd blocks */
extern VgHashTable MAC_(malloc_list);
-/* Function pointers for the two skins to track interesting events. */
+/* Function pointers for the two tools to track interesting events. */
extern void (*MAC_(new_mem_heap)) ( Addr a, UInt len, Bool is_inited );
extern void (*MAC_(ban_mem_heap)) ( Addr a, UInt len );
extern void (*MAC_(die_mem_heap)) ( Addr a, UInt len );
VG_USERREQ__COUNT_LEAKS,
/* These two have been moved into core, because they are useful for
- any skin that tracks heap blocks. Hence the suffix. But they're
+ any tool that tracks heap blocks. Hence the suffix. But they're
still here for backwards compatibility, although Valgrind will
abort with an explanatory message if you use them. */
VG_USERREQ__MALLOCLIKE_BLOCK__OLD_DO_NOT_USE,
sed "s/\(==\|--\|\+\+\|\*\*\)[0-9]\{1,5\}\1 //" |
# Remove "<name>, a <description> for x86-linux." line and the following
-# copyright notice line. Works for skin and core intro lines.
+# copyright notice line. Works for tool and core intro lines.
sed "/^.*, .* for x86-linux\./ , /./ d" |
# Remove other introductory lines