mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
Arch-abstraction: renamed "vg_skin.h" as "tool.h". Kept a residual vg_skin.h
(which just #includes tool.h) for backward-compatibility. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2647
This commit is contained in:
parent
fef3e74483
commit
13a74aa53a
@ -29,7 +29,7 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
//#include "vg_profile.c"
|
||||
|
||||
/* For cache simulation */
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
|
||||
void SK_(pre_clo_init)(void)
|
||||
{
|
||||
|
||||
@ -43,10 +43,10 @@
|
||||
|
||||
#include "vg_constants.h"
|
||||
|
||||
/* All stuff visible to core and tools goes in vg_skin.h. Things
|
||||
/* All stuff visible to core and tools goes in tool.h. Things
|
||||
* visible to core but not visible to any tools should go in this
|
||||
* file, core.h. */
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
#include "valgrind.h"
|
||||
|
||||
#undef SK_
|
||||
@ -285,7 +285,7 @@ extern void VGP_(done_profiling) ( void );
|
||||
------------------------------------------------------------------ */
|
||||
/* These structs are not exposed to tools to mitigate possibility of
|
||||
binary-incompatibilities when the core/tool interface changes. Instead,
|
||||
set functions are provided (see include/vg_skin.h). */
|
||||
set functions are provided (see include/tool.h). */
|
||||
typedef
|
||||
struct {
|
||||
Char* name;
|
||||
@ -1619,7 +1619,7 @@ extern Int VGOFF_(ldt);
|
||||
/* This thread's TLS pointer. */
|
||||
extern Int VGOFF_(tls_ptr);
|
||||
|
||||
/* Nb: Most helper offsets are in include/vg_skin.h, for use by tools */
|
||||
/* Nb: Most helper offsets are in include/tool.h, for use by tools */
|
||||
|
||||
extern Int VGOFF_(helper_undefined_instruction);
|
||||
|
||||
|
||||
@ -462,7 +462,7 @@ provide definitions of six functions for comparing errors, printing out errors,
|
||||
reading suppressions from a suppressions file, etc. While writing these
|
||||
functions requires some work, it's much less than doing error handling from
|
||||
scratch because the core is doing most of the work. See the type
|
||||
<code>VgNeeds</code> in <code>include/vg_skin.h</code> for full details of all
|
||||
<code>VgNeeds</code> in <code>include/tool.h</code> for full details of all
|
||||
the needs.<p>
|
||||
|
||||
Third, the tool can indicate which events in core it wants to be notified
|
||||
@ -478,7 +478,7 @@ appropriate function pointer, and the assigned function will be called each
|
||||
time this happens.<p>
|
||||
|
||||
More information about ``details'', ``needs'' and ``trackable events'' can be
|
||||
found in <code>include/vg_skin.h</code>.<p>
|
||||
found in <code>include/tool.h</code>.<p>
|
||||
|
||||
<a name="instr"></a>
|
||||
<h3>2.8 Instrumentation</h3>
|
||||
@ -512,20 +512,20 @@ Please note that the core/tool split infrastructure is quite complex and
|
||||
not brilliantly documented. Here are some important points, but there are
|
||||
undoubtedly many others that I should note but haven't thought of.<p>
|
||||
|
||||
The file <code>include/vg_skin.h</code> contains all the types,
|
||||
The file <code>include/tool.h</code> contains all the types,
|
||||
macros, functions, etc. that a tool should (hopefully) need, and is the only
|
||||
<code>.h</code> file a tool should need to <code>#include</code>.<p>
|
||||
|
||||
In particular, you probably shouldn't use anything from the C library (there
|
||||
are deep reasons for this, trust us). Valgrind provides an implementation of a
|
||||
reasonable subset of the C library, details of which are in
|
||||
<code>vg_skin.h</code>.<p>
|
||||
<code>tool.h</code>.<p>
|
||||
|
||||
Similarly, when writing a tool, you shouldn't need to look at any of the code
|
||||
in Valgrind's core. Although it might be useful sometimes to help understand
|
||||
something.<p>
|
||||
|
||||
<code>vg_skin.h</code> has a reasonable amount of documentation in it that
|
||||
<code>tool.h</code> has a reasonable amount of documentation in it that
|
||||
should hopefully be enough to get you going. But ultimately, the tools
|
||||
distributed (Memcheck, Addrcheck, Cachegrind, Lackey, etc.) are probably the
|
||||
best documentation of all, for the moment.<p>
|
||||
@ -581,7 +581,7 @@ and you'll need to get rid of this to extract useful tracebacks from
|
||||
GDB.<p>
|
||||
|
||||
If you just want to know whether a program point has been reached, using the
|
||||
<code>OINK</code> macro (in <code> include/vg_skin.h</code>) can be easier than
|
||||
<code>OINK</code> macro (in <code> include/tool.h</code>) can be easier than
|
||||
using GDB.<p>
|
||||
|
||||
If you are having problems with your UCode instrumentation, it's likely that
|
||||
@ -689,7 +689,7 @@ The profiler is stack-based; you can register a profiling event with
|
||||
<code>VGP_(register_profile_event)()</code> and then use the
|
||||
<code>VGP_PUSHCC</code> and <code>VGP_POPCC</code> macros to record time spent
|
||||
doing certain things. New profiling event numbers must not overlap with the
|
||||
core profiling event numbers. See <code>include/vg_skin.h</code> for details
|
||||
core profiling event numbers. See <code>include/tool.h</code> for details
|
||||
and Memcheck for an example.
|
||||
|
||||
|
||||
|
||||
@ -140,7 +140,7 @@ if ($output eq "callwrap") {
|
||||
};
|
||||
$indent = " ";
|
||||
} elsif ($output eq "initfunc") {
|
||||
$include = "vg_skin.h";
|
||||
$include = "tool.h";
|
||||
$generate = sub ($$$@) {
|
||||
my ($pfx, $ret, $func, @args) = @_;
|
||||
my $args = join ", ", @args;
|
||||
|
||||
@ -67,7 +67,7 @@ typedef
|
||||
/* Errors. Extensible (via the 'extra' field). Tools can use a normal
|
||||
enum (with element values in the normal range (0..)) for `ekind'.
|
||||
Functions for getting/setting the tool-relevant fields are in
|
||||
include/vg_skin.h.
|
||||
include/tool.h.
|
||||
|
||||
When errors are found and recorded with VG_(maybe_record_error)(), all
|
||||
the tool must do is pass in the four parameters; core will
|
||||
@ -140,7 +140,7 @@ typedef
|
||||
SuppLocTy;
|
||||
|
||||
/* Suppressions. Tools can get/set tool-relevant parts with functions
|
||||
declared in include/vg_skin.h. Extensible via the 'extra' field.
|
||||
declared in include/tool.h. Extensible via the 'extra' field.
|
||||
Tools can use a normal enum (with element values in the normal range
|
||||
(0..)) for `skind'. */
|
||||
struct _Supp {
|
||||
|
||||
@ -29,11 +29,11 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
/* We only import vg_skin.h here, because this file only provides functions
|
||||
/* We only import tool.h here, because this file only provides functions
|
||||
for doing things that could be done directly by the tool -- it's just to
|
||||
make tools' lives easier, rather than let them do something they
|
||||
couldn't otherwise do. */
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
|
||||
|
||||
void VG_(lit_to_reg)(UCodeBlock* cb, UInt lit, UInt t)
|
||||
|
||||
@ -118,7 +118,7 @@ struct _ScopeRange {
|
||||
#define STRCHUNKSIZE (64*1024)
|
||||
|
||||
/* A structure which contains information pertaining to one mapped
|
||||
text segment. (typedef in vg_skin.h) */
|
||||
text segment. (typedef in tool.h) */
|
||||
struct _SegInfo {
|
||||
struct _SegInfo* next; /* list of SegInfos */
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
#include "helgrind.h"
|
||||
|
||||
static UInt n_eraser_warnings = 0;
|
||||
|
||||
@ -1,21 +1,22 @@
|
||||
EXTRA_DIST = \
|
||||
vg_profile.c \
|
||||
vg_skin.h.base
|
||||
tool.h.base
|
||||
|
||||
incincdir = $(includedir)/valgrind
|
||||
|
||||
incinc_HEADERS = \
|
||||
valgrind.h \
|
||||
vg_constants_skin.h \
|
||||
vg_skin.h \
|
||||
vg_kerneliface.h
|
||||
tool.h \
|
||||
vg_kerneliface.h \
|
||||
vg_skin.h
|
||||
|
||||
BUILT_SOURCES = vg_skin.h
|
||||
CLEANFILES = vg_skin.h
|
||||
BUILT_SOURCES = tool.h
|
||||
CLEANFILES = tool.h
|
||||
|
||||
vg_skin.h: $(srcdir)/vg_skin.h.base \
|
||||
tool.h: $(srcdir)/tool.h.base \
|
||||
$(top_srcdir)/coregrind/gen_toolint.pl $(top_srcdir)/coregrind/toolfuncs.def
|
||||
rm -f $@
|
||||
cat $(srcdir)/vg_skin.h.base > $@
|
||||
cat $(srcdir)/tool.h.base > $@
|
||||
$(PERL) $(top_srcdir)/coregrind/gen_toolint.pl toolproto < $(top_srcdir)/coregrind/toolfuncs.def >> $@ || rm -f $@
|
||||
$(PERL) $(top_srcdir)/coregrind/gen_toolint.pl initproto < $(top_srcdir)/coregrind/toolfuncs.def >> $@ || rm -f $@
|
||||
|
||||
@ -34,13 +34,13 @@
|
||||
#ifndef __VG_PROFILE_C
|
||||
#define __VG_PROFILE_C
|
||||
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
|
||||
/* get rid of these, if possible */
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
/* Override the empty definitions from vg_skin.h */
|
||||
/* Override the empty definitions from tool.h */
|
||||
#undef VGP_PUSHCC
|
||||
#undef VGP_POPCC
|
||||
#define VGP_PUSHCC(x) if (VG_(clo_profile)) VGP_(pushcc)(x)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
|
||||
/* Nb: use ULongs because the numbers can get very big */
|
||||
static ULong n_dlrr_calls = 0;
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
// be inspected step-wise to an appropriate depth. See comments on data
|
||||
// structures below for more info on how things work.
|
||||
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
//#include "vg_profile.c"
|
||||
|
||||
#include "valgrind.h" // For {MALLOC,FREE}LIKE_BLOCK
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#ifndef __MAC_SHARED_H
|
||||
#define __MAC_SHARED_H
|
||||
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
|
||||
#define MAC_(str) VGAPPEND(vgMAC_,str)
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#include "vg_skin.h"
|
||||
#include "tool.h"
|
||||
|
||||
void SK_(pre_clo_init)(void)
|
||||
{
|
||||
|
||||
@ -36,6 +36,7 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
||||
/usr/include/valgrind/valgrind.h
|
||||
/usr/include/valgrind/memcheck.h
|
||||
/usr/include/valgrind/helgrind.h
|
||||
/usr/include/valgrind/tool.h
|
||||
/usr/include/valgrind/vg_constants_skin.h
|
||||
/usr/include/valgrind/vg_kerneliface.h
|
||||
/usr/include/valgrind/vg_skin.h
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user