25 Commits

Author SHA1 Message Date
Nicholas Nethercote
3bfae3eec1 Merged r9185 (fix up getsockopt mess) from the DARWIN branch, minus the
Darwin-specific parts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9186
2009-02-17 00:23:30 +00:00
Nicholas Nethercote
5ad1dd61f9 Introduce a new type, PtrdiffT. Replace lots of uses of OffT (all those
that are memory offsets) with PtrdiffT;  OffT should only be used for file
sizes and offsets.

Change Off64T from a ULong to a Long, as it should be.  Replace some uses
of ULong in the address space manager with Off64T to match.

Also add a comment explaining the meanings of the basic types like Addr,
OffT, SizeT, etc.

Also fix the prototype for VG_(pread) -- the last arg is an OffT, not an
Int.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8959
2009-01-15 21:29:24 +00:00
Julian Seward
2ebd38040f Handle sys_lookup_dcookie on amd64-linux (Andrew Haley). Also take
the opportunity to move the handlers from syswrap-generic.c (which
they certainly aren't) to syswrap-linux.c.  Fixes #175044.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8769
2008-11-16 21:40:54 +00:00
Julian Seward
832a3d400b Tidy up the wrappers for pread64 and pwrite64, and make these two
syscalls available on ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8519
2008-08-07 20:29:55 +00:00
Bart Van Assche
bd28f145d5 Moved support for Linux-specific system call sys_init_module from generic to Linux wrappers. Added wrapper for sys_delete_module system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8266
2008-06-21 16:28:24 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Tom Hughes
2b63758b93 Enable sigsuspend on x86-linux and ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5819
2006-04-03 16:38:33 +00:00
Julian Seward
b7cd9cb3de Plumb 64-bit file offsets throughout the address space manager.
Untested.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4844
2005-10-02 17:01:41 +00:00
Tom Hughes
6c610b89c7 Rationalise the mmap system call handling - after examining the kernel
source it turns out that there are five different versions of mmap for
the three platforms we currently support:

  - On x86-linux there is mmap (aka old_mmap) which takes the
    arguments in a memory block and the offset in bytes; and
    mmap2 (aka sys_mmap2) which takes the arguments in the normal
    way and the offset in pages.

  - On ppc32-linux there is mmap (aka sys_mmap) which takes the
    arguments in the normal way and the offset in bytes; and
    mmap2 (aka sys_mmap2) which takes the arguments in the normal
    way and the offset in pages.

  - On amd64-linux everything is simple and there is just the one
    call, mmap (aka sys_mmap)  which takes the arguments in the normal
    way and the offset in bytes.

To reconcile all this I have created a generic handler and then
written five platform specific wrappers which normalise all the
arguments and then call the generic handler.

I have also modified the address space manager to use mmap2 rather
than mmap on x86 and ppc32 so that large offsets can be correctly
handled.

There is still an issue of OffT truncating offsets as we go through
the address space manager that will need to be addressed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4834
2005-09-30 08:07:53 +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
Nicholas Nethercote
1394091f86 Moved sys_mmap2 wrapper from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4595
2005-08-31 03:00:40 +00:00
Nicholas Nethercote
c198b967b3 Moved some more syscall wrappers from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4594
2005-08-31 02:44:31 +00:00
Nicholas Nethercote
b79e7281d4 Moved sched_* from "generic" to "linux"; Darwin doesn't have them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4576
2005-08-30 02:17:23 +00:00
Nicholas Nethercote
40eb28bec1 Move *xattr from "generic" to "linux". Darwin has them, but with an extra
parameter.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4575
2005-08-30 01:53:54 +00:00
Nicholas Nethercote
45fc4050f8 Move *chown16 syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4523
2005-08-26 04:36:10 +00:00
Nicholas Nethercote
1fa6f9bf7a Move get*16 and set*16 syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4521
2005-08-26 04:27:54 +00:00
Nicholas Nethercote
7fd1f02169 Move cap{get,set} syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4520
2005-08-26 04:03:04 +00:00
Nicholas Nethercote
c710281899 Move mq_* syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4517
2005-08-26 03:43:28 +00:00
Tom Hughes
3f28625849 Implement the waitid system call. Fixes bug #110202.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4329
2005-08-05 07:32:04 +00:00
Nicholas Nethercote
d35537f51f Removed some repetition in the way VG_(record_fd_open)() is called.
As part of this, VG_(resolve_filename)() no longer calls VG_(malloc)()
and so m_libcfile no longer depends on m_mallocfree.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4001
2005-06-23 02:26:47 +00:00
Julian Seward
9cb0696641 For symbols which have C-level global scope but which we regard as
module-local, use the new ML_ prefix instead of VG_.  This makes it
trivial to see which names are those exported from public module
interfaces: precisely those using VG_.

/* VG_ is for symbols exported from modules.  ML_ (module-local) is
   for symbols which are not intended to be visible outside modules,
   but which cannot be declared as C 'static's since they need to be
   visible across C files within a given module.  It is a mistake for
   a ML_ name to appear in a pub_core_*.h or pub_tool_*.h file.
   Likewise it is a mistake for a VG_ name to appear in a priv_*.h
   file. 
*/



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4000
2005-06-23 01:02:53 +00:00
Nicholas Nethercote
ba17e79287 Slight reduce m_syswrap's dependence on m_signals by moving
VG_(client_signal_OK)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3982
2005-06-21 03:52:49 +00:00
Nicholas Nethercote
b54b42c310 Rename m_syscalls/ as m_syswrap/ to complete the module renaming.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3924
2005-06-17 22:27:21 +00:00