different error kinds were reusing the same struct for storing their
details. Each one used some but not all the fields, and the AddrInfo was
similar, and it was very confusing.
So I changed MC_Error and AddrInfo to be tagged unions, like Vex's IRExpr and
IRStmt types. The resulting code is a little more verbose but much easier
to understand. I also split up several error kinds, which also made things
simpler. The user-visible behaviour is identical except for a couple of
very minor things that I've documented in the NEWS file for the 3.3.0
release.
Ideally I'd get rid of the Addr and Char* fields in the core Error type,
which are not always used, and do them similarly within tools. But that
would require changing the core/tool interface, so I'm leaving it for the
moment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6402
Mostly commented out the unused stuff relating to ThreadErrs and MutexErrs,
which no longer exist.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6399
since the suppression-matching machinery does the same. Not doing so
causes auto-generated suppressions involving Z-mangled fn names to not
work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6377
Accumulate statistics about the number of searches in the errors and
suppressions lists, and rearrange the suppressions list when searching
to reduce cost of future searches.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6271
interface, except for the syscall numbers, into that. Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.
include/pub_tool_basics.h previously dragged in the entire kernel
interface. I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly. This is why there are many modified .c files -- they have
all acquired an extra #include line.
This certainly breaks all platforms except x86. Will fix shortly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225
interception and wrapping. This was causing failures matching
function names in suppressions to function names in backtraces when
the latter names were Z-encoded (eg malloc), which typically caused
all leak suppressions to fail because they contain names such as
malloc, which are Z-encoded.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5548
branch hereby becomes inactive. This currently breaks everything
except x86; fixes for amd64/ppc32 to follow.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5520
failures, so as to help parsers stop parsing:
- after any kind of assertion failure or panic
- if suppression file is missing or has a syntax error
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5130
unique / 30000 total to 1000 unique / 100000 total. Programs are
generally bigger now than 3 years ago.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4957
using "obj:*" or "fun:*". Also generate "obj:*" for such lines
with --gen-suppressions. Includes a regtest.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4447
easier to compare it to the output of other XML generating tools.
Regtest expected-output changes to follow.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4356
- m_main: if --log-file-qualifier applies, do not add ".pid"
at the end of the name
- Fix the logic which detected whether the just-devised name
already existed. This was broken (by me) because it could not
distinguish the reasons for failing to open the logfile.
Doing this required changing the return type of VG_(open)
from Int to SysRes (to make failure reasons visible) and
that's the cause of most of the changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4228
a few places have to #include pub_core_stacktrace.h themselves, but
that's ok because explicit is better.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3976
m_debugger. This removes the dependence of m_signals.c and m_errormgr.c
on m_main.c. It required also moving VG_(clexecfd) out of m_main.c; I put
it in m_libcproc.c which seemed like an ok-but-not-great choice.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3957
- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.
- Managed to finally remove core.h and tool.h, double hurrah!
- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.
- Lots of little cleanups and changes related to the above.
- I even did a small amount of documentation updating.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944
needs to #include pub_core_mallocfree.h. As a result, we need
to #include it explicitly everywhere else.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3881
As part of this, killed the VG_STRINGIFY macro, which was used to expand
out names like "VG_(foo)" and "vgPlain_foo" in assertion failure
messages. This is good since we actually want the "VG_(foo)" form used
in these messages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3842
relying on any other modules -- in m_libcbase.
Also converted the 'size' parameters to functions like VG_(memcpy) and
VG_(strncpy) from Int to SizeT, as they should be.
Also removed VG_(atoll16) and VG_(toupper), which weren't being used.
Also made VG_(atoll36) less flexible -- it now only does base-36 numbers
instead of any base in the range 2..36, since base-36 is the only one we
need. As part of that, I fixed a horrible bug in it which caused it to
return incorrect answers for any number containing the digits 'A'..'I'!
(Eg. for "A; it would return 17 instead of 10!)
Had to disable the assertions in VG_(string_match), since this module can't
see vg_assert, which wasn't ideal but also isn't a disaster.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3838
number of files that depend on it, but there are still some which should be
removed in the future.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3819
form. The relevant flag is --xml=yes. Currently this only works with
Memcheck.
Specifying this flag fixes various other options relating to verbosity
and behaviour of the leak checker, so that the resulting output is in
a relatively fixed form suitable for parsing by GUIs.
Still to do:
* Add mechanism to show error counts
* Add regression test
* Document the resulting format
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3773
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
into a new module m_tooliface. Pretty straightforward. Touches a lot
of files because many files use this interface and so need to include
the headers for the new module.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3652
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