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
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
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
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
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
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