22 Commits

Author SHA1 Message Date
Tom Hughes
8441a53495 Implement a few extra ioctls based on patch from Eric Pouech in bug #120728.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5633
2006-02-11 13:29:09 +00:00
Julian Seward
dd1dbcc10f Synthesise and deliver SIGTRAP to clients when requested to do so by vex.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5617
2006-02-07 20:56:41 +00:00
Julian Seward
8ba9a34088 Add framework for ppc64 support. Apologies in advance for the
inevitable breakage to other platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5250
2005-11-29 13:05:56 +00:00
Tom Hughes
2f49a0d567 Removed vki_ntohs definition and the infrastructure that supported
it as it is no longer used.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5164
2005-11-17 12:14:42 +00:00
Tom Hughes
39e6ec034f Handle some ALSA ioctls that don't have size or direction hints.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5131
2005-11-14 17:03:54 +00:00
Tom Hughes
09d3b7060d Add named constants for si_code values to replace the magic numbers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5092
2005-11-12 00:13:20 +00:00
Tom Hughes
fb53b628e2 Do ptrace_setregs in a ppc32 compatible way instead of a ppc64 way.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5052
2005-11-09 08:52:56 +00:00
Julian Seward
4ce62c9445 If the launcher can't figure out what it's own name is, don't bail
out.  Instead, print a warning message, continue, and cause any
attempt to trace into a child process to fail with ECHILD.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4861
2005-10-04 23:07:33 +00:00
Tom Hughes
760dbdc42a Get the SHM_RDONLY test the right way round. Fixes bug #113796.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4852
2005-10-04 12:04:06 +00:00
Julian Seward
68ccd98f62 Get rid of some macros used only by the old aspacemgr, and tidy up
m_main even more.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4802
2005-09-28 01:36:01 +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
Tom Hughes
cf8c1b047f Handle the SCTP_GET_LOCAL_ADDRS and SCTP_GET_PEER_ADDRS getsockopt
calls correctly. Fix to bug #111231.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4549
2005-08-28 10:16:29 +00:00
Nicholas Nethercote
9d7e8b9ab2 Move some kernel constants to the right place.
Also reinstated SF_DEVICE, which is used to ensure we don't try and
leakcheck a page that is mapped from a device.  This got lost in the
2.x-to-3.x transition, or some time after.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4538
2005-08-27 17:20:53 +00:00
Tom Hughes
1dc053205f Handle the HDIO_GETGEO ioctl. Secondary problem found from bug #109780.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4290
2005-07-28 16:13:42 +00:00
Tom Hughes
e7a2d4c9cd Define extra block device ioctls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4289
2005-07-28 16:10:42 +00:00
Tom Hughes
ed055c7ea2 Bring the vki_sigevent_t definition into line with current kernels.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4216
2005-07-20 13:45:43 +00:00
Tom Hughes
0fef787853 Handle the BLKGETSIZE64 ioctl. Fixes bug #104797.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4161
2005-07-18 13:26:55 +00:00
Nicholas Nethercote
5986d3e25f Fix bug #107524 -- epoll_ctl does not access 'events' if it's a
EPOLL_CTL_DEL invocation.

Also renamed our "struct epoll_event" to "struct vki_epoll_event" as it
should be called.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4014
2005-06-24 21:41:28 +00:00
Nicholas Nethercote
40a921359c Move VKI_SIGVGKILL and VKI_SIGVGRTUSERMAX out of vki-linux.h since they're
not really from the kernel and they're defined in terms of VG_(max_signal),
which is in m_signals.  Renamed them with the VG_ prefix too, since they're
now not part of the kernel interface.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3990
2005-06-21 22:23:59 +00:00
Cerion Armour-Brown
d5f7c8aed3 Finally, valgrind on ppc32.
Plenty still to do, but simple programs like ls seem to run ok

Thanks, Paul, for having your ppc port of valgrind 2.4 to work from!




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3969
2005-06-20 15:51:07 +00:00
Julian Seward
2479bb6b9b Change the way thread termination is handled. Until now, there has
been a concept of a 'master thread'.  This is the first thread in the
process.  There was special logic which kept the master thread alive
artificially should it attempt to exit before its children.  So the
master would wait for all children to exit and then exit itself, in
the process emitting the final summary of errors, leaks, etc.

This has the advantage that any process waiting on this one will see
the final summaries appearing before its sys_wait call returns.  In
other words, the final summary output is synchronous with the
master-thread exiting.

Unfortunately the master-thread idea has a serious drawback, namely
that it can and sometimes does cause threaded programs to deadlock at
exit.  It introduces an artificial dependency which is that the master
thread cannot really exit until all its children have exited.  If --
by any means at all -- the children are waiting for the master to exit
before exiting themselves, deadlock results.  There are now two known
examples of such deadlocks.

This commit removes the master thread concept and lets threads exit in
the order which they would have exited without Valgrind's involvement.
The last thread to exit prints the final summaries.  This has the
disadvantage that final output may appear arbitrarily later relative
to the exit of the initial thread.  Whether this is a problem in
practice remains to be seen.

As a minor side effect of this change, some functions have had
_NORETURN added to their names.  Such functions do not return.  The
thread in which they execute is guaranteed to exit before they return.
This makes the logic somewhat easier to follow.

amd64 compilation is now broken.  I will fix it shortly.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3816
2005-05-30 21:44:08 +00:00
Nicholas Nethercote
8c63e060a7 Restructured the include/ directory.
- All the subdirectories have gone: arm/, x86/, amd64/, linux/,         
  x86-linux/, amd64-linux/, arm-linux/.

- The following files were moved out of those directories into include/:

    amd64-linux/vki_arch.h            --> vki-amd64-linux.h
    x86-linux/vki_arch.h              --> vki-x86-linux.h
    x86-linux/vki_arch_posixtypes.h   --> vki_posixtypes-x86-linux.h
    linux/vki.h                       --> vki-linux.h
    amd64-linux/vki_arch_posixtypes.h --> vki_posixtypes-amd64-linux.h

- The following very small files were inlined into tool.h using the "#if
  defined(VGP_x86)..." technique:

    x86/tool_arch.h
    arm/tool_arch.h
    amd64/tool_arch.h

  The same technique was used twice to include the appropriate
  vki-$PLATFORM and vki-$OS files into tool.h.  

- The other files in those directories were removed.

- The build is much simpler, since we have 7(!) fewer Makefile.am files.
  Far fewer -I options are needed when compiling, too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3733
2005-05-16 03:25:12 +00:00