28 Commits

Author SHA1 Message Date
Nicholas Nethercote
4e8bcf9076 Move the last remaining tests out of corecheck.
Also introduced VG_(showing_core_errors)() to make core error display
more consistent.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4073
2005-07-01 04:15:36 +00:00
Julian Seward
2a0a78dffe A couple more XML cases that slipped through the net.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4056
2005-06-30 00:10:16 +00:00
Julian Seward
bef467758b XML output wibble (purely decorative)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4055
2005-06-29 23:38:33 +00:00
Nicholas Nethercote
78acf96da0 Don't #include pub_core_stacktrace.h in pub_core_execontext.h. So
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
2005-06-21 00:33:19 +00:00
Nicholas Nethercote
f4d8932fc8 Remove some unnecessary #includes, comment some others.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3966
2005-06-20 03:36:51 +00:00
Nicholas Nethercote
1b3a92639e Moved VG_(start_debugger) out of m_main.c into its own module,
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
2005-06-19 19:25:44 +00:00
Nicholas Nethercote
62fa883300 Move VG_(bbs_done) out of main and make it local in scheduler.c. This
removes the dependence of m_translate.c and m_libcassert.c on m_main.c.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3954
2005-06-19 18:38:24 +00:00
Nicholas Nethercote
f174930b23 Final commit for the initial modularisation pass:
- 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
2005-06-19 01:24:32 +00:00
Nicholas Nethercote
e3abdc62d5 Finished the modularisation of vg_mylibc.c, which meant it could be removed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3894
2005-06-12 02:43:17 +00:00
Nicholas Nethercote
bd0bea1552 Remove VG_ERRTXT_LEN from core.h.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3886
2005-06-11 05:04:09 +00:00
Nicholas Nethercote
38d2799b5b Having moved VG_(arena_strdup)() out of core.h, core.h no longer
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
2005-06-11 01:31:52 +00:00
Nicholas Nethercote
face101a47 Modularised file and socket libc stuff in m_libcfile.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3844
2005-06-04 20:03:55 +00:00
Nicholas Nethercote
eb2d0a7d06 Modularised assertions and panics in m_libcassert.
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
2005-06-04 19:16:06 +00:00
Nicholas Nethercote
dbc8c6d99c Modularise printing functions in m_libcprint.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3840
2005-06-03 03:08:39 +00:00
Nicholas Nethercote
09980587a9 Started modularising vg_mylibc. Put all the standalone stuff -- ie. not
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
2005-06-02 03:39:33 +00:00
Julian Seward
ff9e61ce9a Minor refinements/bug-fixes to XML printing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3837
2005-06-01 17:35:23 +00:00
Nicholas Nethercote
d01259a1d0 Modularised all the debug info stuff as m_debuginfo/. It's a mess
and needs further cleaning up, but it's a start.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3821
2005-05-31 02:38:09 +00:00
Nicholas Nethercote
d13bacd9cd Modularised vg_main.c as m_main.c. Moved some stuff out of it to reduce the
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
2005-05-31 00:23:43 +00:00
Julian Seward
01017a2f82 XML output futzing-around-with.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3794
2005-05-24 14:21:45 +00:00
Julian Seward
651db21589 Print error counts in the XML output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3779
2005-05-20 02:29:52 +00:00
Julian Seward
161cfde150 First pass at adding ability for Memcheck to print all output in XML
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
2005-05-19 00:25:45 +00:00
Nicholas Nethercote
937a49ea05 Added module m_options for holding all the command-line option stuff.
Perhaps parts of process_cmd_line_option() should go in here, but I've
not done that for now.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3751
2005-05-16 23:31:24 +00:00
Nicholas Nethercote
d36924d966 bugfix: don't print bogus "obj:" lines when generating suppressions.
Thanks to Julian for spotting and diagnosing it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3728
2005-05-15 21:09:40 +00:00
Nicholas Nethercote
92c61a5fd1 Don't mix backticks and apostrophes when quoting words -- eg. use 'foo'
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
2005-05-15 17:28:26 +00:00
Nicholas Nethercote
a08637efe9 Modularised vg_translate.c as m_translate.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3700
2005-05-13 23:11:40 +00:00
Nicholas Nethercote
247e241160 Modularised the core/tool interface ('details', 'needs' and VG_(tdict))
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
2005-05-10 04:37:01 +00:00
Nicholas Nethercote
a08662c48c Big clean-up: changed the core/tool interface to be mediated entirely
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
2005-05-09 01:02:08 +00:00
Julian Seward
4ea28e5187 Rename the first three modules as per naming scheme.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3555
2005-04-24 12:33:12 +00:00