199 Commits

Author SHA1 Message Date
Nicholas Nethercote
d55a693729 Add test case for forking threaded programs.
MERGED FROM CVS HEAD


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3326
2005-03-13 05:10:08 +00:00
Julian Seward
d6a05763c7 Followup to rev 3319: remove bits of these tests which 3319 didn't,
for some reason.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3320
2005-03-12 21:49:18 +00:00
Julian Seward
9a76bb9755 Get rid of dastest and rcl_assert. These test instructions that are
so obscure that there has been no need to implement them in Vex-x86
despite having run huge programs through Vex.

Besides, rcl_assert was originally included as a result of fixing an
assertion failure in the old UCode machinery, which no longer exists.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3319
2005-03-12 21:46:56 +00:00
Nicholas Nethercote
5a3535ea87 --num-callers default is now 12, so say that in the help.
Fix cmdline tests for match new --num-callers stuff.

MERGED FROM CVS HEAD



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3315
2005-03-12 20:59:29 +00:00
Julian Seward
a1b340db35 Update expected output.
This highlights an interesting problem with the error filters.
The change is:

-   at 0x.......: xToI (floored.c:16)
-   by 0x.......: main (floored.c:9)
+   at 0x........: xToI (floored.c:16)
+   by 0x........: main (floored.c:9)

IOW, the change happened because some code got moved around,
causing the length of the hex numbers changed, defeating the
hexdigit-"normaliser".



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3314
2005-03-12 20:55:31 +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
0384583ee1 Fix Nulgrind's filter_stderr, and also fix the none/tests/cmdline2 test
(required fixing the usage msg slightly).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3278
2005-03-11 04:57:30 +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
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
efcf1e61ec Complete rewrite (I think this is the 4th incarnation) of translation
table/cache management.  Two main changes.  (1) Translation areas are
recorded using VexGuestExtents, so that Vex is now properly supported
and code deletion works correctly.  (2) Low overhead BB profiling,
enabled by the --profile-flags=<XXXXXXXX> option.  This finds the top
N bbs at exit and shows them, so as to give a basis from which to do
performane tuning.

To support this, the way tt/tc work is changed.  It is still a
sectored arrangement, but now each sector has its own hash table.
This simplifies a lot of things.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3226
2005-01-19 11:55:34 +00:00
Julian Seward
7956de0e96 Re-enable regression tests for PSLLDQ.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3222
2005-01-11 15:02:34 +00:00
Julian Seward
fe31fa6884 Update some expected regtest outputs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3221
2005-01-11 14:21:02 +00:00
Julian Seward
c097685542 Make the insn_ tests work at least for the insns which Vex (x86 guest)
currently implements.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3206
2004-12-17 19:12:47 +00:00
Julian Seward
a51979511c Reinstate tests for psrldq.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3203
2004-12-15 17:41:34 +00:00
Julian Seward
a474a2cc3d Updated expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3201
2004-12-14 10:00:41 +00:00
Julian Seward
87f86e25b5 For now, disable test of: pmaddwd psadbw pslldq psrldq. The x86 front
end doesn't yet handle them (nothing critically difficult), and they
are unlikely to turn up in compiler-generated code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3185
2004-12-10 02:10:15 +00:00
Julian Seward
225ce01fdd Updated expected output
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3181
2004-12-06 00:47:37 +00:00
Julian Seward
13127c3479 Use different register numbers in different register banks, so as to
expose bugs resulting from confusion of which register fields are
which during insn decode.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3180
2004-12-06 00:37:59 +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
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
6afeca28a1 Fix reg test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3142
2004-11-29 16:08:22 +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
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
Nicholas Nethercote
1d8a68900b Fix this test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3112
2004-11-26 12:54:07 +00:00
Julian Seward
4517436fe7 Second (failed) attempt to get cmdline2 to work right.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3110
2004-11-26 12:37:10 +00:00
Julian Seward
0af14fc436 Update expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3109
2004-11-26 12:00:02 +00:00
Julian Seward
e91eb48b89 Make various other tools compile; also fix the stage2 linker script.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3068
2004-11-22 20:38:40 +00:00
Nicholas Nethercote
454ab569fe Converted the SK_ prefix to TL_ everywhere.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3060
2004-11-22 18:33:15 +00:00
Nicholas Nethercote
40de233989 Changed name of tool shared objects from vgskin_XXX.so to vgtool_XXX.so.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3054
2004-11-22 16:58:05 +00:00
Nicholas Nethercote
3b4dc0bdba Generalised the reg test script again: replaced the "cpu_test" line,
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
2004-11-18 12:48:17 +00:00
Nicholas Nethercote
a2d1e021a4 Generalised reg test script: instead of having a "delete:" line, for removing
files once a test has completed, we have a "cleanup:" line, which specifies a
cleanup command.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3039
2004-11-18 11:57:00 +00:00
Tom Hughes
6e422fd573 The calculation used to round the size of a new thread's stack to a
multiple of the page size had an off by one error. Fixed it to use
the PGROUNDUP macro instead of trying to do the calculation itself
and then get it wrong.

BUG: 93309


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3030
2004-11-16 19:40:05 +00:00
Tom Hughes
55a7ef5758 Make sure we are using perl 5.6.0 as earlier versions won't work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2905
2004-11-02 09:49:19 +00:00
Nicholas Nethercote
0754912b3c whoops
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2875
2004-10-29 13:17:36 +00:00
Nicholas Nethercote
a530ca4130 Make exec-sigmask more robust.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2860
2004-10-27 14:06:56 +00:00
Nicholas Nethercote
ac36b57353 Fix "make check" for when src_dir != build_dir
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2826
2004-10-21 14:07:58 +00:00
Nicholas Nethercote
26e657b4df Make tests that cause coredumps remove them. Don't need the core entries in
.cvsignore any more as a result.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2822
2004-10-20 13:33:07 +00:00
Nicholas Nethercote
fb447e7be6 Arch-abstraction:
- conditionally compile x86-specific line within yield.c.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2821
2004-10-20 13:21:54 +00:00
Nicholas Nethercote
9ec6f17bea whoops
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2820
2004-10-20 13:02:21 +00:00
Nicholas Nethercote
c870659354 Arch-abstraction:
- Factor out remaining x86-specific regtests in none/ into an x86/ subdir.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2819
2004-10-20 12:36:47 +00:00
Nicholas Nethercote
cce964074d Arch-abstraction:
- Forgot to move the insn_*.def files when moving the insn_* tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2811
2004-10-19 19:12:21 +00:00
Nicholas Nethercote
78b8e2c67f Arch-abstraction:
- things I forgot to do when moving the insn_* tests...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2810
2004-10-19 19:07:32 +00:00
Nicholas Nethercote
66adb12133 Arch-abstraction:
- Moved all the insn_* tests into x86/ subdirectories.  What are the chances of
  me getting this right on the first attempt?


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2809
2004-10-19 18:54:11 +00:00
Nicholas Nethercote
f4d320e3c4 Arch-abstraction:
- Rewrote tests/cputest.c so that it can apply to different kinds of
  processors.  The idea being that any arch-specific tests have a cpu_test:
  label in their .vgtest file, so they'll only get executed if the right
  machine is being used.
- Rewrote a bunch of .vgtest files accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2802
2004-10-19 16:29:30 +00:00
Nicholas Nethercote
13a74aa53a Arch-abstraction: renamed "vg_skin.h" as "tool.h". Kept a residual vg_skin.h
(which just #includes tool.h) for backward-compatibility.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2647
2004-09-02 08:51:43 +00:00
Nicholas Nethercote
a32b040099 Update .cvsignore for recently added regression tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2642
2004-09-01 23:34:37 +00:00
Nicholas Nethercote
acd57ac595 Use Makefile.am includes. This gets rid of 110 lines of repetitive Makefile.am
cruft, yay!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2641
2004-09-01 23:20:49 +00:00
Nicholas Nethercote
0db27515b1 Putting "dist_" in front of a "_DATA" variable means it is included in "make
dist".  This avoids the need to put it in "EXTRA_DIST", and saves a few lines
in all the docs Makefile.am files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2614
2004-08-25 11:40:07 +00:00