Commit Graph

154 Commits

Author SHA1 Message Date
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
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
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
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
f8c1231b7b Several unrelated changes:
- don't use AS_STRING_HELP, as older autoconfs don't like it
- fix a minor stupidity about the GDB path
- allow amd64 as a platform (wee!)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3085
2004-11-23 17:52:24 +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
Julian Seward
046709cedf Add enough gunk to configure.in to get through ./configure on
armv4l-unknown-linux-gnu.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3079
2004-11-23 01:17:29 +00:00
Julian Seward
cf98fcdf2f Point back to my VEX tree. This needs to be fixed with high priority.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3076
2004-11-23 00:39:29 +00:00
Nicholas Nethercote
48aff7c26f Convert the 'skin_errors' need to 'tool_errors'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3053
2004-11-22 16:46:13 +00:00
Julian Seward
500467da2a Tiresome build-system hacks to connect to the VEX includes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3052
2004-11-22 13:44:11 +00:00
Nicholas Nethercote
d0ef8153b4 Arch-abstraction:
- Moved the system call table into x86-linux, since it's platform specific.

- Started moving the non-generic syscall wrappers into linux/syscalls.c and
  x86-linux/syscalls.c as appropriate.

- Added new coregrind/linux/ directory and some files in it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3034
2004-11-17 17:11:45 +00:00
Nicholas Nethercote
d67d99a446 Arch-abstraction:
- Started overhauling the syscalls to account for different architectures;
  in particular, accounts for the fact that the __NR_foo syscall number
  often doesn't directly match with the sys_foo() function that implements the
  function in the Linux kernel.  So started introducing this indirection as
  needed.  Currently, only read() and write() have been done;  the transition
  will be staged, since doing all syscalls in one hit is a total pain.

  This will also pave the way for scalar syscall arg checking with Memcheck,
  now that it is clear what the prototypes of the relevant syscalls are.

- Removed support for 2.2 kernels in the configure test, after discussion with
  Julian.  If it causes major problems, we can consider reverting.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2948
2004-11-08 17:51:39 +00:00
Tom Hughes
81da7615db Really add AM_PROG_CC_C_O this time, rather than AC_PROG_CC_C_O.
BUG: 92331


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2888
2004-11-01 09:50:57 +00:00
Nicholas Nethercote
d0cfce40a7 Removed unused junk:
- tests for header files that are never utilised
- stupid long and bogus X version test that we ignored anyway


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2886
2004-10-31 19:39:18 +00:00
Nicholas Nethercote
c4cf15dc21 Arch-abstraction:
- Added include/x86-linux/ and include/linux/ subdirectories, with Makefile.am
  files.

- Overhauled the definitions of kernel types.  include/vg_kerneliface.h is now
  three files, include/linux/vki.h, include/x86-linux/vki_arch.h, and
  include/x86-linux/vki_arch_posixtypes.h.  These files separate the
  common/Linux and x86/Linux parts cleanly.  All code is copied verbatim from
  the relevant kernel headers, except that VKI_/vki_ prefixes are added as
  necessary to distinguish them from glibc types.  (This is done consistently,
  unlike previously when some types did not have the prefixes.)

  All code is clearly marked to show which particular header file it came from,
  and the Linux version used.  (I used 2.6.8.1, the most recent stable release,
  for all of them.)

  A few of the types changed;  this is because they changed between the older
  versions of Linux and the current 2.6.8.1.  I checked that all these changes
  were ok with respect to backwards compatibility for our purposes.

- vg_unsafe.h has been removed;  we are no longer including any kernel headers,
  as we have our own copies for everything.  This is because installed kernel
  headers are not reliable, and often cause compilation problems. (bug
  #92420 is a recent example)

- Removed some no-longer-needed header-presence tests from configure.in.

- Some code in the rest of Valgrind was changed to account for some slight
  changes in the names of our VKI_/vki_ kernel constants and types.

- Updated README_MISSING_SYSCALL_OR_IOCTL accordingly.

- Fixed off-by-one error with VKI_GDT_ENTRY_TLS_MAX (merged from stable branch)

The end result is that the kernel types situation should be much clearer, and
similar files can be created relatively easily for other architectures as
necessary.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2884
2004-10-31 18:48:21 +00:00
Tom Hughes
f437f6d838 Add AM_PROG_CC_C_O to configure.in to check for cc -c -o support as this
is needed for some of the constructs we now use in the Makefile's.

BUG: 92331


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2876
2004-10-29 18:02:13 +00:00
Nicholas Nethercote
0a36260ff0 Arch-abstraction:
- factor out varying ASM flags


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2837
2004-10-25 19:20:14 +00:00
Nicholas Nethercote
ea8dfa8f34 If PIE (position-independent executables) are supported, build valgrind's
stage2 as one.  This means that we're not hard-wiring stage2 in at 0xb0000000,
which means our memory layout is a bit more flexible, yay.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2833
2004-10-25 17:18:24 +00:00
Nicholas Nethercote
8d5541b229 Arch-abstraction:
- factor out different CFLAGS in Makefiles


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2829
2004-10-25 15:21:00 +00:00
Nicholas Nethercote
d611af0e22 Arch-abstraction:
- factor out KICKSTART_BASE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2828
2004-10-25 14:05:56 +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
03517b9c00 Arch-abstraction:
- Move x86-specific regtests for Cachegrind into an x86/ subdir.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2804
2004-10-19 17:00:59 +00:00
Nicholas Nethercote
61efc22607 Use "ppc" rather than "powerpc" -- it's less typing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2801
2004-10-19 14:24:42 +00:00
Nicholas Nethercote
bf0340373c Arch-abstraction: fix up valgrind.h for future inclusion of other
architectures.  Had to recast it as valgrind.h.in;  now at configure time the
appropriate #define is set so that the appropriate snippet of assembly code is
chosen.  It's done this way rather than with x86/ etc. directories like the
rest of Valgrind, because this header file must stand alone for inclusion by
other programs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2794
2004-10-18 18:07:49 +00:00
Nicholas Nethercote
2062b4dc59 Preparing for powerpc inclusion, one day.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2750
2004-10-13 13:50:01 +00:00
Nicholas Nethercote
e06b949479 Arch-abstraction: genericise warning about unsupported architectures.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2749
2004-10-13 13:18:51 +00:00
Nicholas Nethercote
67d6dc6e2b Arch-abstraction:
- In Cachegrind, abstract out x86-specific use of CPUID to find cache
  configuration.  Required adding a cachegrind/x86/ directory, and fiddling
  a bit with the build system.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2698
2004-09-11 16:45:27 +00:00
Nicholas Nethercote
a8d85f7180 Arch-abstraction:
- create coregrind/x86-linux/ directory.
- move vg_unistd.h into x86-linux/, because it's platform-dependent.  Also
  rename it as vki_unistd.h to make clear it's a kernel interface thing.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2681
2004-09-10 14:23:59 +00:00
Nicholas Nethercote
18355ff96b Arch-abstraction:
- Added include/x86/:  contains tool_arch.h, Makefile.am, .cvsignore.

- Added coregrind/x86/state.c.  Contains some arch-specific code for dealing
  with x86 registers -- eg. setting up the baseBlock, loading/saving the whole
  register state.  It is compiled into coregrind/x86/libarch.a and linked via
  ${VG_ARCH} with the core.

  Relatedly, also added coregrind/x86/{core_arch.h,core_arch_asm.h}.

- Correspondingly abstracted the register state out of ThreadState.  This
  affected every place that touches registers, and there are a lot of them.
  (Eventually all the register touching should be abstracted out in an
  arch-neutral way, but not yet;  one step at a time.)

- Added some declarations about register loading/saving functions to core.h;
  all architectures will have to provide these functions.

- Rejigged the build system so that the arch-specific stuff is all done via
  ${VG_ARCH}, rather than naming e.g. x86/ directly.  Appropriate -I arguments
  are used so that all the headers are found, etc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2656
2004-09-03 13:45:29 +00:00
Julian Seward
5980962b82 HEAD now reports 2.3.0.CVS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2637
2004-08-31 16:26:27 +00:00
Julian Seward
ee716258dc --> 2.2.0
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2635
2004-08-31 00:15:19 +00:00
Tom Hughes
e7323896b0 Recognise X.Org servers and treat them the same as XFree86 4.x servers. This
avoids warnings from configure about an unknown X server type on recent Linux
distributions that use X.Org instead of XFree86.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2625
2004-08-30 10:31:21 +00:00
Tom Hughes
d70eefb647 Switch to using the newer forms of AC_INIT and AM_INIT_AUTOMAKE so that
configure can print the package name correctly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2624
2004-08-29 09:46:38 +00:00
Tom Hughes
da2b7b0f72 Only check whether linux/mii.h can be processed so that we don't
generate ugly warnings by trying to compile it.

Patch from Eric Estievenart <eric.estievenart@free.fr>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2613
2004-08-24 23:09:07 +00:00
Nicholas Nethercote
4572ebc0f1 Add a reassuring warnings about the linux/mii.h warning.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2612
2004-08-24 14:38:53 +00:00
Nicholas Nethercote
5bfc8bf7af Tweak configure.in in preparation for arch and OS ports -- we now have
variables VG_ARCH, VG_OS and VG_PLATFORM (which equals ${VG_ARCH}-${VG_OS}).
Also added a check for the platform (arch/OS) combination.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2600
2004-08-23 14:54:40 +00:00
Tom Hughes
2ff805b932 Minor rejigging of includes to help compilation on Debian systems.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2590
2004-08-18 08:11:34 +00:00
Tom Hughes
546afbe696 Add support for the POSIX message queue system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2585
2004-08-14 18:52:27 +00:00
Julian Seward
7a8b73a9fb --> 2.1.3.CVS
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2508
2004-07-18 11:47:55 +00:00
Julian Seward
4c259b37bd --> 2.1.2
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2505
2004-07-18 09:25:17 +00:00
Tom Hughes
c88651b1fc Add support for SIOCGMIIPHY, SIOCGMIIREG and SIOCSMIIREG ioctls and
improve the checking of other interface related ioctls.

Based in part on a patch from Jim McDonald <jim@mcdee.net> supplied
as a fix for bug #83344.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2424
2004-06-17 23:04:58 +00:00
Tom Hughes
d9d4e91c04 Fixed the sem test to work on systems with semtimedop.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2414
2004-06-14 12:33:43 +00:00
Tom Hughes
f267e2c7d0 Fixed the NPTL cleanup handler support to try and make sure it will
compile on systems with NPTL header files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2406
2004-06-12 17:25:25 +00:00
Tom Hughes
a159f627cb Make support for the FBIOGET ioctls conditional on linux/fb.h being
present at compile time.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2382
2004-04-22 07:28:43 +00:00
Nicholas Nethercote
f37f533f73 Remove illegal '-' in @VERSION@.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2357
2004-04-12 09:09:29 +00:00
Julian Seward
5c2a3999d3 head --> 2.1.2-CVS so as to distinguish it from everything else :-)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2311
2004-03-13 00:49:39 +00:00
Jeremy Fitzhardinge
82aaa16ef9 Fix "make distcheck", and also make sure that the generated archive
contains everything needed to "make regtest".  Bump the version.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2308
2004-03-12 10:51:39 +00:00
Nicholas Nethercote
563c4e566a Adding Massif, the heap profiler.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2245
2004-02-14 16:40:02 +00:00