471 Commits

Author SHA1 Message Date
Nicholas Nethercote
58fb32879e Make MAC_(print_malloc_stats) local by moving it and associated stuff to
mac_needs.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3336
2005-03-13 06:10:20 +00:00
Nicholas Nethercote
6c7e08a8f5 Documentation update. This should bring the core of the documentation
up to date with reality.  Please give this a proofread.

I ran out of steam at memcheck/docs/mc_techdocs.html, which is even more
hopelessly out of date.  I will note that cacheprof.org is some kind of
dental insurance company now...

MERGED, PAINFULLY, FROM CVS HEAD



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3321
2005-03-12 22:14:42 +00:00
Nicholas Nethercote
5ef4243598 Default to using --leak-check=summary.
MERGED FROM CVS HEAD



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3312
2005-03-12 20:38:13 +00:00
Nicholas Nethercote
05fe123a9e Update copyright notice for 2005 on all relevant files. Don't bother trying
to be selective about it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3303
2005-03-12 16:22:54 +00:00
Nicholas Nethercote
1b3b96a692 Fix false assertion in pattern matching.
MERGED FROM CVS HEAD


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3279
2005-03-11 05:05:50 +00:00
Nicholas Nethercote
38c5424bc9 Remove messages about not being able to clean up non-existent core files.
MERGED FROM CVS HEAD


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3277
2005-03-11 04:48:18 +00:00
Julian Seward
d5b545da24 These files are no longer needed. Bye!
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3266
2005-03-11 00:22:10 +00:00
Julian Seward
0356d27ca6 Merge in changes from the 2.4.0 line. This basically brings in the
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
2005-03-10 23:59:00 +00:00
Julian Seward
7c542ccd39 Add new files resulting from merging in the 2.4.0 line. Many of these
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
2005-03-10 23:23:45 +00:00
Julian Seward
8d9a222274 Track renaming of Vex's Iop_*128* primops to Iop_*V128*.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3232
2005-02-07 23:50:18 +00:00
Julian Seward
990997c313 Handle Add64/Sub64 (naively).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3224
2005-01-15 20:43:58 +00:00
Julian Seward
9091a78381 Add support for 64-bit SIMD primops.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3223
2005-01-13 19:17:06 +00:00
Julian Seward
022eef96c2 Handle IRStmt_MFence in the tools.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3217
2005-01-07 12:10:21 +00:00
Julian Seward
d703ca2b44 Finishing installing PaulM's improved accuracy handling for Add/Sub,
and also do better for CmpEQ/CmpNE.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3212
2004-12-31 01:16:11 +00:00
Julian Seward
97c1a3baee mkUifU: add missing case
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3205
2004-12-17 01:24:54 +00:00
Julian Seward
b7a642c80b Handle Iop_Sar16.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3197
2004-12-14 01:15:31 +00:00
Julian Seward
3ad2ff4302 Complete enough 128-bit vector stuff in memcheck so that SSE2 works.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3192
2004-12-12 16:45:06 +00:00
Julian Seward
bc929b0e2d Support for 64x2 vector floating point.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3191
2004-12-10 21:44:22 +00:00
Julian Seward
84d094a9f8 Stuff to make Memcheck work with SSE1 instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3190
2004-12-10 18:57:51 +00:00
Julian Seward
2af2c78613 Basics for 128-bit SIMD code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3189
2004-12-10 14:58:26 +00:00
Julian Seward
96c2c41a93 Fix enough stuff so that x86 MMX tests work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3188
2004-12-10 13:35:22 +00:00
Julian Seward
ba3c8e024c Fix enough stuff so that x86 floating point tests work properly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3187
2004-12-10 13:17:55 +00:00
Nicholas Nethercote
ce2585d447 Changed message at the top of files, and the startup message, and the
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
2004-12-01 14:14:42 +00:00
Nicholas Nethercote
b0d10bc3b4 64-bit cleanness: don't assume 32 bits in MAC_Chunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3174
2004-12-01 00:19:38 +00:00
Nicholas Nethercote
71525a2d57 Updated docs with all the changes that I'm aware of that happened since
Donna converted them to XML.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3173
2004-12-01 00:02:36 +00:00
Nicholas Nethercote
b1b5c00b01 Streamlined and consistified alignment checking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3168
2004-11-30 18:08:05 +00:00
Nicholas Nethercote
782dd25de9 64-bit cleanness: fix nasty bug... in the memory allocators, redzones
were being kept as UInts.  They were sometimes negated and then used as
indices to arrays, and on 64-bit platforms they get converted
incorrectly (using zero-extension instead of sign extension, I think)
before the indexing happens, giving a totally bogus index.

The fix was to convert all these types to SizeT.  It would be nice to be
able to avoid this automatically somehow in the future.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3158
2004-11-30 13:26:29 +00:00
Nicholas Nethercote
7a75a9f583 Overhauled the docs. Removed all the HTML files, put in XML files as
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
2004-11-30 10:43:45 +00:00
Nicholas Nethercote
10b4595add Added beginnings of an AMD64 port, so lots of new files and directories.
It compiles, but aborts immediately if you try to run it.

I didn't include ldt.c;  I'm not sure how the LDT is used on AMD64.  It can be
added later if necessary.

While doing this, did some 64-bit cleanness fixes:
- Added necessary intermediate casts to ULong to avoid warnings when converting
  ThreadId to void* and vice versa, in vg_scheduler.c.
- Fixed VALGRIND_NON_SIMD_CALL[0123] to use 'long' as the return type.
- Fixed VALGRIND_PRINTF{,BACKTRACE} to use unsigned longs instead of unsigned
  ints, as needed.
- Converted some offsets in vg_symtab2.h from "Int" to "OffT".
- Made strlen, strncat, etc, use SizeT instead of 'unsigned int' for the length
  parameter.
- Couple of other minor things.

I had to insert some "#ifdef __amd64__" and "#ifndef __amd64__" guards in
places.  In particular, in vg_mylibc.c, some of our syscall wrappers aren't
appropriate for AMD64 because the syscall numbering is a bit different in
places.  This difference will have to be abstracted out somehow.

Also rewrote the sys_fcntl and sys_fcntl64 wrappers, as required for AMD64.

Also moved the ipc wrapper into x86, since it's not applicable for
AMD64.  However, it is applicable (I think) for ARM, so it would be nice
to work out a way to share syscall wrappers between some, but not all,
archs.  Hmm.  Also now using the real IPC constants rather than magic
numbers in the wrapper.

Other non-AMD64-related fixes:
- ARM: fixed syscall table by accounting for the fact that syscall
  numbers don't start at 0, but rather at 0x900000.
- Converted a few places to use ThreadId instead of 'int' or 'Int' for
  thread IDs.
- Added both AMD64 and ARM (which I'd forgotten) entries to valgrind.spec.in.
- Tweaked comments in various places.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3136
2004-11-29 13:54:10 +00:00
Julian Seward
46c0de784f Increase stated average translation size, at least for now.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3133
2004-11-28 16:56:51 +00:00
Julian Seward
798a984cea Build fixes for gcc-2.95.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3132
2004-11-28 14:25:01 +00:00
Nicholas Nethercote
f00e834c58 Use better syscall argument names for two wrappers, now that "res" and
"arg[2345]" don't clash with macros.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3128
2004-11-27 16:57:18 +00:00
Nicholas Nethercote
7a04aed730 Introduced build variables VG_ARCH_ALL, VG_OS_ALL, and VG_PLATFORM_ALL,
which list all the arches/OSes/platforms supported.  These are used by
several newly added DIST_SUBDIRS automake commands, which specify that
although when you are building you only want to build for the current
arch/OS/platform, when you do 'make dist' you want every
arch/OS/platform to get included.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3127
2004-11-27 16:47:42 +00:00
Nicholas Nethercote
4399d9700f Added beginnings of an ARM port, to the point where it compiles. It does not
run, though.  There are lots of stubs to be filled in.  (The asm ones currently
just have "swi" in them, which seems to cause seg faults.) 

Also, some of the macros are decided dubious, especially:

  ARCH_* are bogus
  SYSCALL_RET is bogus
  PLATFORM_SET_SYSCALL_RESULT is bogus
  not sure about SET_SYSCALL_RETVAL
  FIRST_STACK_FRAME et al -- bogus?
  VG_MAX_JUMPS ?

And in stage2.lds, the 0x8048000 is almost certainly wrong


This required some tweakings of the core:
- some of the vki_*.h kernel types were fixed up

- had to disable the AM_PROG_CC_C_O macro in configure.in, because automake
  (autoconf?) didn't like it...

- some "#ifdef __x86__" guards were introduced, for nasty x86 things I don't
  yet know how to factor out (trampoline page muck, sysinfo page muck).

- fixed a minor stupidity in vg_proxylwp.c.

- moved the ptrace wrapper into the x86-linux part

- had to change the intercept mangling scheme, to use 'J' instead of '$' as the
  escape char because GCC didn't like '$'.  This is all very dubious, and only
  works because none of our intercepted symbols contains a 'J'.  To be fixed up
  ASAP.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3120
2004-11-26 19:34:36 +00:00
Julian Seward
26e2eb2b4a When doing pessimistic lazy propagation through a dirty helper call,
do not consider inputs from those parts of the guest state marked as
read (or modified) which which are declared to be always-defined, and
dually do write outputs to those parts of the guest state written (or
modified) which are declared to be always-defined.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3119
2004-11-26 19:17:47 +00:00
Nicholas Nethercote
fdccda9d04 Removed mc_helpers.S, which is no longer used.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3104
2004-11-26 10:35:44 +00:00
Nicholas Nethercote
ead76e69ac Removing the insn_* tests from helgrind, memcheck, addrcheck and
cachegrind, because having them there doesn't add anything beyond that
tested in 'none'.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3101
2004-11-25 17:47:43 +00:00
Nicholas Nethercote
efed8e4671 Removed shadow_regs 'need', because it was being used only trivially in
a couple of places, and is no longer needed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3096
2004-11-24 16:57:16 +00:00
Nicholas Nethercote
398ce0c269 Cleanups, mostly for the baseBlock removal.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3095
2004-11-24 16:43:43 +00:00
Nicholas Nethercote
feb4fbaef5 Removed all uses of register numbers (eg. arch-specific ones like R_EAX, and
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
2004-11-24 16:30:22 +00:00
Julian Seward
3558db91b1 Get rid of baseBlock. Now, when generated code is running, the guest
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
2004-11-24 10:44:19 +00:00
Nicholas Nethercote
9f2118c217 Fix this regression test to account for the fact that FP regs are now
checked for definedness errors lazily, just like integer regs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3084
2004-11-23 17:19:53 +00:00
Nicholas Nethercote
f7d26d172b Make these work again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3083
2004-11-23 17:13:58 +00:00
Nicholas Nethercote
6cc0d4c473 Add a mandatory --with-vex option to configure script.
Also, fix a Makefile so that Memcheck's regtests all build again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3081
2004-11-23 16:31:56 +00:00
Nicholas Nethercote
7f0984ea02 The syscall wrappers for sys_fcntl{,64} were too simplistic -- the 3rd
arg is only used if the 2nd arg has particular values, so we were
getting false positives.  This commit makes the wrappers smarter to
account for this.  I updated the reg test too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3080
2004-11-23 14:57:49 +00:00
Julian Seward
166033939c Do our own implementations of strchrnul() and rawmemchr().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3075
2004-11-23 00:20:17 +00:00
Nicholas Nethercote
86751c1c2e Removed now-defunct read/write checks for FPU ops.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3074
2004-11-22 21:29:38 +00:00
Nicholas Nethercote
196e8dfd25 Removed the now-defunct files vg_from_ucode.c and vg_to_ucode.c.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3073
2004-11-22 21:23:08 +00:00
Nicholas Nethercote
ddf3e0178b Remove now-defunct --cleanup option for Memcheck.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3072
2004-11-22 21:16:08 +00:00
Julian Seward
fd3934e1e5 Fix some linking problems which were preventing memcheck from starting.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3069
2004-11-22 20:51:49 +00:00