334 Commits

Author SHA1 Message Date
Julian Seward
5d49360cbb Use dashes rather than underscores in library names (njn).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9223
2009-02-22 23:40:31 +00:00
Nicholas Nethercote
f0f8b48fcf Merge the non-Darwin parts of r9140 (install vgpreload .dSYMs), just to keep
the trunk and DARWIN branch in sync.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9141
2009-02-12 00:30:02 +00:00
Nicholas Nethercote
3dfc8932ae Changed the way files are installed. Instead of going into
$INSTALL/<platform>/<filename>, they go to $INSTALL/<filename>-<platform>.
These filenames match those built in the build tree, and so simplifies the
build system signficantly and avoids the horrible sed renamings that were
previously required.  This will also help greatly with the treatment of
.dSYM debug directories in the DARWIN branch.

Files affected include:
- preload libraries such as vgpreload_core-<platform>.so and
  libmpiwrap-<platform>.so
- libraries such as libcoregrind_<platform>.a
- executables such as memcheck-<platform>

I updated the manual and added a note to the NEWS file about the change,
because it will affect a small number of users.

I did my best to update the AIX launcher/initimg correctly, but it hasn't
been tested.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9135
2009-02-11 00:35:45 +00:00
Nicholas Nethercote
1690244664 Merged r9120 (Merge Makefile.{inplace,install}.am, and simplify installation
of libmpiwrap.so) from trunk.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9121
2009-02-06 23:27:16 +00:00
Nicholas Nethercote
2d5f140a5b Make Makefile.install.am much less confusing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9118
2009-02-06 07:12:57 +00:00
Nicholas Nethercote
b7b48cb4a6 Removed Makefile.core.am with some judicious refactoring. Also fix a stupid
typo in launcher-linux.c that was added in the last commit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9116
2009-02-06 05:34:19 +00:00
Nicholas Nethercote
009cd24326 Removed Makefile.core.am with some judicious refactoring.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9114
2009-02-06 04:49:14 +00:00
Julian Seward
b666f0fa23 Don't try to build m_ume on aix5.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9052
2009-01-24 01:22:25 +00:00
Nicholas Nethercote
ed322feb84 Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
  configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
  #defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
  in them.
- The ones that are in all-caps have a _CAPS suffix.

So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer.  The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.

cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities.  In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits.  Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones.  (This is partially merged from the DARWIN branch.)

configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.

valgrind.pc.in: try to make this more accurate.  I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9031
2009-01-22 21:56:32 +00:00
Nicholas Nethercote
c07262448b - Split up m_ume.c into m_ume/{main,elf,script}.c. This will make merging
the DARWIN branch easier later.
- Remove the disabled vgtest_ume test, it's very unlikely it'll ever work
  again.
- Move VG_(find_auxv) to initimg-linux.c, the only place it's used, and make
  it static.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9004
2009-01-21 02:26:56 +00:00
Julian Seward
09dac86eca Add a new module, m_seqmatch, which does very simple sequence (regexp)
matching, in the function VG_(generic_match).  Patterns to be matched
against may contain only '*'-style wildcards (matches any number of
elements, we don't care what they are), '?' wildcards (matches exactly
one element, we don't care what it is) and literal elements.

It is totally abstractified, in the sense that the pattern and input
arrays may be arrays of anything.  The caller provides enough
information so that VG_(generic_match) can step along both arrays, and
can ask the questions "is this pattern element a '*' ?", "is this
pattern element a '?' ?", and "does this pattern element match an
input element ?".

The existing function VG_(string_match) is reimplemented using
VG_(generic_match), although the ability to escape metacharacters in
the pattern string is removed -- I don't think it was ever used.

In m_errormgr, matching of suppression stacks (including wildcard
"..." lines) against error stacks is re-implemented using
VG_(generic_match).

Further detailed comments are in m_seqmatch.h and pub_tool_seqmatch.h.

A negative side effect is that VG_(string_match) will be much slower
than before, due to the abstractification.  It may be necessary to
reimplement a specialised version later.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8816
2008-12-12 08:07:49 +00:00
Julian Seward
dee63731b9 Add a new container data type, a Sparse Word Array: an array of UWord
which is also indexed by UWord.  This can be used as a replacement for
WordFM with unboxed keys, when the key ranges are dense.  It is
implemented as a 256-way radix tree (4-deep on 32-bit platforms,
8-deep on 64-bit platforms).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8806
2008-12-06 22:07:35 +00:00
Julian Seward
e9c7a88688 Update the C++ demangler to that from libiberty in the gcc svn trunk,
rev 141363.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8710
2008-10-26 11:53:30 +00:00
Julian Seward
27b2106884 Move the WordFM (AVL trees of UWord-pairs) implementation from
helgrind/ into the core.  It's just too darn useful to not be in the
core.  There is some overlap in functionality between OSet and WordFM,
but OSet is more space efficient in some circumstances, whereas WordFM
is easier to use and a bit more flexible in some cases.

Also in this new module (m_wordfm) is a type WordBag, build on top of
WordFM.  This provides Multiset of UWords functionality.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8524
2008-08-19 08:38:52 +00:00
Julian Seward
14af4957fc Merge in the DATASYMS branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540
2008-03-03 01:35:41 +00:00
Julian Seward
63d002a2cd Unbreak the build on ppc64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6654
2007-03-21 02:27:38 +00:00
Julian Seward
14b9b8b8d2 Make ptrace-based launchers able to handle --help, --version etc.
Problem is that --help etc are handled by the tool exe.  But a
ptrace-based launch scheme can't run "no program" if the user just
types "valgrind --help" because the launcher depends on starting the
client first and only then attaching valgrind to it using ptrace.  So
instead provide a dummy do-nothing program to run when no program is
specified.  m_main notices this and acts as if there really had been
no program specified.

This has no effect at all on Linux/ELF program launching.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6653
2007-03-19 18:38:55 +00:00
Julian Seward
804c7868a1 Expandable arrays of arbitrary element type T are a simple, useful
abstraction implemented independently in several places in the code
base (bad!).  This commit moves into public view a generic
implementation of it which has been lurking in readxcoff.c for some
time.  Currently nothing uses it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6614
2007-02-25 11:51:13 +00:00
Julian Seward
3b34ac0468 Pass CC and AR to vex's Makefile here too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6475
2007-01-05 23:50:45 +00:00
Nicholas Nethercote
033e3bd4e9 Removed the unused pthread_model and thread_model modules.
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
2006-12-14 02:55:58 +00:00
Julian Seward
713b2d46c0 Merge r6086:
Makefile.am changes for AIX5.  Almost all boilerplate stuff fitting in
with the existing factorisation scheme.  The only change of interest
is that configure.in now generates automake symbols of name
VGP_platform and VGO_os, whereas previously it just made VG_platform
which was a bit inconsistent with the VGP/VGO/VGA scheme used in C
code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6242
2006-10-17 00:56:43 +00:00
Julian Seward
8d33663fc8 Move code that creates the initial Linux memory image (stack, env,
etc) from m_main into m_initimg.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6234
2006-10-15 01:26:40 +00:00
Julian Seward
0f3600bb0f Split m_aspacemgr into a generic part and a Linux-specific part.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6230
2006-10-14 22:25:30 +00:00
Julian Seward
ae8215b3ac Create a new module, m_vki, and move all knowledge about the kernel
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
2006-10-14 19:26:10 +00:00
Julian Seward
4b572a567e Create a new module, m_vkiscnums, and move all the system call numbers
into that.  Mostly this means moving vki_unistd-<plat>.h to
include/vki/vki-scnums-<plat>.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6224
2006-10-14 15:51:32 +00:00
Julian Seward
27b95f28a5 Cleanup/restructure m_debuginfo, as described in
coregrind/m_debuginfo/README.txt.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5823
2006-04-04 15:12:44 +00:00
Julian Seward
4513adda3d Hmm. Why is this file still here? (It got folded into aspacemgr.c
a while back.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5800
2006-03-29 19:33:54 +00:00
Julian Seward
397ba02010 'make dist' fix
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5644
2006-02-13 14:23:05 +00:00
Julian Seward
32f134b8c1 Somewhat rehash the biarch-build machinery so as to (1) formalise the
distinction between primary and secondary build targets, and (2) make
it independent of the default behaviour of gcc (iow, what gcc does
when you specify neither -m32 nor -m64).

As a result, an out-of-the-box build on ppc64-linux now builds a
system which is basically for 64-bit PowerPC, but also has the ability
to run 32-bit ppc-linux binaries (exactly the same arrangement as you
get when building on amd64-linux).

There are various twists and turns.  multiple-architectures.txt is
updated all the gory details.

This will break amd64 builds until such time as
<tool>/tests/{amd64,x86}/Makefile.am are fixed up (shortly).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5493
2006-01-04 01:20:28 +00:00
Nicholas Nethercote
e1a645cce6 Renamed coregrind.h to pub_core_clreq.h and introduced pub_tool_clreq.h to
be consistent with the module naming scheme.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5398
2005-12-21 20:22:52 +00:00
Nicholas Nethercote
3866282110 Remove all remaining profiling gunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5388
2005-12-19 22:48:39 +00:00
Julian Seward
8ba9a34088 Add framework for ppc64 support. Apologies in advance for the
inevitable breakage to other platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5250
2005-11-29 13:05:56 +00:00
Julian Seward
8b1a316b99 @KICKSTART_BASE@ is history.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5093
2005-11-12 12:09:33 +00:00
Julian Seward
554556bbef Install libvex.a and libcoregrind.a, needed for external tool builds.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5053
2005-11-09 14:04:27 +00:00
Tom Hughes
246dd8353a Set CPPFLAGS correctly when building the core preload library.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5036
2005-11-08 12:27:42 +00:00
Tom Hughes
b5c033e906 Dual architecture support - this commit is a major rework of the build
system that allows multiple copies of valgrind to be built so that we
can build both x86 and amd64 versions of the tools on amd64 machines.

The launcher is then modified to look at the program being run and
decide which tool to use to run it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5027
2005-11-07 15:24:38 +00:00
Tom Hughes
48f8c22e44 Get core dumping working again - the architecture specific code that
was in the sigframe module has been moved into the coredump module 
where it belongs and things fixed up to compiler again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4970
2005-10-31 17:05:21 +00:00
Julian Seward
9432f46e02 rm the skiplist module, as it has been superseded by the AVL-tree
based m_oset module.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4952
2005-10-20 00:09:11 +00:00
Julian Seward
287d92271f The m_syswrap subsystem is Valgrind's model of how the kernel behaves
with respect to syscalls.  It is detailed and comprehensive but does
not offer a way to deal with minor deviations in behaviour from the
vanilla kernel sources, either due to running a hacked kernel or
running a vanilla kernel with a custom kernel module loaded.

This commit adds a flexible way to handle such cases without polluting
the vanilla handler syswrap-*.c files or their supporting vki_*.h
header files.  For each OS, a syswrap-OS-variants.c file is added,
containing wrappers for variants of OS.  A new command line flag
--kernel-variants= carries a comma separated list of variant names
that apply to the current run.  There are no other changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4873
2005-10-06 03:19:49 +00:00
Nicholas Nethercote
4ef4aabbd0 Make the dispatch files platform-specific, not just arch-specific,
as requested by Greg Parker.  (The ppc32/Darwin dispatch loop is
different to the ppc32/Linux one, for example.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4843
2005-10-02 14:48:09 +00:00
Nicholas Nethercote
06e8adae1a add missing file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4832
2005-09-30 02:17:16 +00:00
Nicholas Nethercote
21f31418f0 Fix up vg_preload_core.so vs. vgpreload_core.so confusion introduced
during the ASPACEM merge.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4815
2005-09-29 00:25:07 +00:00
Julian Seward
b98ac01c9f Get rid of pub_core_main.h, so that m_main is not imported by anyone,
and so is not part of a module cycle.  This requires a moderately
grotty hack of passing a continuation-function pointer in a global
variable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4806
2005-09-28 10:47:38 +00:00
Julian Seward
c3d915e97b Rename m_launcher.c to launcher.c to make clear it's not part of the
normal module scheme -- it's a standalone program.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4804
2005-09-28 01:53:07 +00:00
Nicholas Nethercote
d9c2f2f027 Fix up Makefile.core.am which got a little confused during the ASPACEM
merging.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4794
2005-09-27 20:27:04 +00:00
Julian Seward
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Tom Hughes
abd818b4c0 Quote the expansion of CC when invoking make for VEX. Fixes bug #111785.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4589
2005-08-30 18:47:35 +00:00
Julian Seward
42b4516a9d Pass $(CC) to the vex Makefile.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4559
2005-08-29 12:11:06 +00:00
Nicholas Nethercote
63df7df1c8 Give file a better name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4546
2005-08-28 04:48:12 +00:00
Nicholas Nethercote
e1d86426b2 Move the core dumping code out of m_signals to a new module,
m_coredump.  The code is still commented out, though.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4545
2005-08-28 04:38:12 +00:00