things. These made sense when the arch/OS/platform-specific code was in
one module, but as that code got mixed in with generic code the boundary
between generic and non-generic blurred, and the distinction made less
sense. So let's get rid of them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4002
I've changed it so it now is, which makes it consistent with the
other 'needs'. Because of this, I was also able to invert the dependence
between m_mallocfree and m_tooliface, which is related to setting
the redzone size for client heap blocks. As a result, m_tooliface
now doesn't depend on anything except pub_core_basics.h, hooray!
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3979
sensible now -- no vg_dummy_profile.c, no silly #including of
vg_profile.c from tools.
Unfortunately, it still doesn't work, due to bad interactions
with signal handling that I don't understand.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3833
rather than `foo', as www.cl.cam.ac.uk/~mgk25/ucs/quotes.html explains
we should (in more detail than you'd imagine was possible). I did this
both in output messages and in some comments, for consistency.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3723
malloc/free implementation, and m_replacemalloc with the stuff for the tools
that replace malloc with their own version. Previously these two areas of
functionality were mixed up somewhat.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3648
through the VG_(tdict) function dictionary, rather than using TL_(foo)
functions.
This facilitated the following changes:
- Removed the "TL_" prefix, which is no longer needed.
- Removed the auto-generated files vg_toolint.[ch], which were no longer
needed, which simplifies the build a great deal. Their (greatly
streamlined) contents went into core.h and vg_needs.h (and will soon
go into a new module defining the core/tool interface).
This also meant that tool.h.base reverted to tool.h (so no more
accidentally editing tool.h and not having the changes go into the
repo, hooray!) And gen_toolint.pl was removed. And toolfuncs.def was
removed.
- Removed VG_(missing_tool_func)(), no longer used.
- Bumped the core/tool interface major version number to 8. And I
killed the minor version number, which was never used. The layout
of the ToolInfo struct is such that this should not cause problems.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3644
lot to one. This required two basic changes.
1. Tools are responsible for telling the tool about any functions they
provide that the tool may call. This includes basic functions like
TL_(instrument)(), functions that assist core services such as
TL_(pp_Error)(), and malloc-replacement-related functions like
TL_(malloc)().
2. Tools that replace malloc now specify the size of the heap block redzones
through an arg to the VG_(malloc_funcs)() function, rather than with a
variable VG_(vg_malloc_redzone_szB).
One consequence of these changes is that VG_(tool_init_dlsym)() no longer
needs to be generated by gen_toolint.pl.
There are a number of further improvements that could follow on from this one.
- Avoid the confusingly different definitions of the TL_() macro in the
core vs. for tools. Indeed, the functions provided by the tools now don't
need to use the TL_() macro at all, as they can have arbitrary names.
- Remove a lot of the auto-generated stuff in vg_toolint.c and vg_toolint.h
(indeed, it might be possible to not auto-generate these at all, which
would be nice).
- The handling of VgToolInterface is currently split across vg_needs.c and
vg_toolint.c, which isn't nice.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3487
sizes to the instrumentatation functions. Make most of the tools
abort if they are not the same; we can't handle that case yet.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3397
user-specified block stuff, which confused me because I wasn't sure whether
to use the code already in SVN, or the code in CVS. Perhaps that code
doesn't need to be changed.
Unfortunately, Memcheck doesn't work entirely correctly -- I get some
spurious errors. Nonetheless I'm checking it in as a starting point.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3353
because the added VG_(find_root_memory)() is just a stub. And there's a
problem with overlap checking that I haven't worked out yet. Still it's a
start. The commit also brings Memcheck back into the build process,
although mc_main.c is entirely commented out at the moment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3352
overhaul of the thread support. Many things are now probably broken,
but at least with --tool=none, simple and not-so-simple threaded and
non-thread programs work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3265
seem to be simply duplication of the x86 instruction set tests into
the addrcheck and helgrind trees. I'm not sure what this duplication
achieves.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3264
string in valgrind.pc.in, so that they describe Valgrind as a "dynamic
binary instrumentation framework", and don't mention platforms at all.
I had to tweak the regtest filters a bit for this.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3178
converted by Donna. Hooked it into the build system so they are only
built when specifically asked for, and when doing "make dist".
They're not perfect; in particular, there are the following problems:
- The plain-text FAQ should be built from FAQ.xml, but this is not
currently done. (The text FAQ has been left in for now.)
- The PS/PDF building doesn't work -- it fails with an incomprehensible
error message which I haven't yet deciphered.
Nonetheless, I'm putting it in so others can see it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3153
- remove warnings from vg_scheduler.c by using (UWord) casts rather than
64-bit-assuming (ULong) casts.
- move deref_Addr() to x86-linux/syscalls.c, where it's now used.
Also got rid of the ancient SIGNAL_SIMULATION flag, which is a remnant of very
early days -- things now only work with signal simulation, so no point in
keeping it around.
Also make addrcheck/tests/fprw work again now that --single-step is
dead.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3137
arch-neutral ones like R_STACK_PTR). Where they were used, we now always talk
about an offset into the Vex guest state, and an offset. As a result,
the shadow register get/set functions had to change. They now also use
an offset and size, and in an arch-neutral way.
Also, I combined the five the post_reg_write* functions into a single one that
takes a 'CorePart' parameter (plus also a ThreadId). Also, I added more
arguments (the CorePart, and the ThreadId) to the post_mem_write event, for
consistency with the pre_mem_* events.
Also, I reduced the number of register names that must be specified by each
arch, by factoring out duplication; and shortened their names for the core (eg.
ARCH_STACK_PTR is now STACK_PTR).
Plus some related minor cleanups in syscall wrappers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3094
state pointer points directly at the ThreadState.arch.vex field, thus
updating it in place and avoiding a lot of code (and time-wasting)
which copies stuff back and forth to baseBlock.
Fix zillions of other places in the system where the current thread id
is needed. It is now passed to all needed places.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3090
Also remove Memcheck's and Addrcheck's use of syscall_wrappers,
since they didn't do anything useful.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3064
which caused the test to be skipped if the CPU type wasn't appropriate,
with a "prereq" line, which specifies a command that must succeed before
the test is run.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3041
- All memory-related errors are now clear whether they are caused by
unaddressable or uninitialised memory. (Previously, writes were
clearly addressability errors, but reads could be either.) Mostly
done by replacing the 'isWrite' field in MAC_Error with 'isUnaddr'.
Also, mc_check_readable() now indicates not just if an error occurred,
but what kind of error (ie. addressability or definedness).
- Put machinery into place in the core to inform tools when registers
are being read by the core -- ie. a 'pre_reg_read' event. Most
notably, this facilitates syscall scalar arg definedness checking for
Memcheck. Currently this is only working for read(), write(), exit()
and exit_group(), but it will be extended as the syscalls are
overhauled as part of the arch-abstraction work.
A consequence of this is that the ParamErr messages have changed. This:
Syscall param write(buf) contains uninitialised byte(s)
now means that the pointer 'buf' is partially undefined. If the memory
pointed to by 'buf' is partially undefined or unaddressable, it says one of:
Syscall param write(buf) points to uninitialised byte(s)
Syscall param write(buf) points to unaddressable byte(s)
The docs have been updated accordingly.
I also added a couple of regression tests.
These two change sare notable for being the first improvements to
Memcheck's checking/errors in a long time.
I also folded mc_clientreqs.c into mc_main.c, which saves exporting a
whole bunch of things that are not used anywhere else.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2949