Commit Graph

101 Commits

Author SHA1 Message Date
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
4ddfee7723 Fix URB ioctl handling. Patch from Hector Martin (bug 191095).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10286
2009-06-09 23:03:02 +00:00
Nicholas Nethercote
a01f086879 Handle another Linux ioctl. Patch from Jay Foad.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10284
2009-06-09 22:31:00 +00:00
Nicholas Nethercote
d3c159040a Abort on unknown fcntl, rather than doing no checking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10094
2009-05-22 00:38:15 +00:00
Nicholas Nethercote
b4dbd225dd DARWIN sync: add ML_({PRE,POST}_unknown_ioctl).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10089
2009-05-22 00:15:06 +00:00
Nicholas Nethercote
131ab00744 Merged non-Darwin-specific parts of r9397,r9423,r9490, 9461, 9462 from the
DARWIN branch.  A big ugly DARWIN/trunk sync commit, mostly to do with
changing the representation of SysRes and vki_sigset_t.  Functionality of
the trunk shouldn't be changed by it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9876
2009-05-18 02:12:08 +00:00
Nicholas Nethercote
3b87b28ca4 Merge r9828 (fix aspacem layering violation) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9831
2009-05-10 22:42:19 +00:00
Tom Hughes
2d43007ce1 Add SIOCGSTAMPNS support. Fixes #188530.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9502
2009-03-31 10:36:58 +00:00
Nicholas Nethercote
2001629c3f Updated copyright years.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344
2009-03-10 22:02:09 +00:00
Nicholas Nethercote
70150c5884 Use "status" as the argname for 'exit' and 'exit_group'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9311
2009-03-03 05:39:23 +00:00
Nicholas Nethercote
87b5e49494 Merge a large chunk of r8949 (the part that moved fcntl and ioctl wrappers
out of syswrap-generic into syswrap-linux) from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9219
2009-02-22 23:00:30 +00:00
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
Julian Seward
f3523a4a0e Some minor format string fixes for gcc-3.3.3 (SuSE 9.1). Not sure why
later gccs don't complain about these.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9019
2009-01-22 12:24:26 +00:00
Tom Hughes
f1ac1fd992 Add signalfd4 support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8930
2009-01-09 16:42:51 +00:00
Tom Hughes
2ebda825b1 Add support ioprio_get and wire up ioprio_set on all platforms.
Fixes bug #177819.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8826
2008-12-15 08:58:29 +00:00
Julian Seward
05e92e79d9 Fix format string warning in PRE(sys_eventfd2).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8817
2008-12-12 08:08:58 +00:00
Tom Hughes
4d4d4c10fe Add support for eventfd2 (and wire up pipe2 on PPC platforms).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8815
2008-12-10 09:28:56 +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
2a5db7f788 Support sys_stime on x86-linux. Fixes #159285.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8736
2008-11-06 23:11:42 +00:00
Julian Seward
f4bffe6909 Support sys_pipe2 on {amd64,x86}-linux. Also, update syscall numbers
for all supported Linuxes to those in linux-2.6.28-rc3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8730
2008-11-05 11:20:59 +00:00
Nicholas Nethercote
0cf8a14c70 - Reinstate the 'atfork' from 2.4.0, which was more powerful, and expose it to
tools.
- Factor out 'execv' from 'system' and expose it to tools.

Partly based on a patch from Robert O'Callahan.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8669
2008-10-13 04:19:15 +00:00
Bart Van Assche
8e96150945 Merged FORMATCHECK branch (r8368) to trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369
2008-07-07 06:49:24 +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
1fb920eeb5 Add '*flags |= SfMayBlock' to PRE(sys_sync_file_range).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8177
2008-06-04 06:49:56 +00:00
Julian Seward
b2651c395b More fiddling with the sys_signalfd wrapper.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8147
2008-05-29 12:56:08 +00:00
Julian Seward
178fbd72d3 Tidy up timerfd wrapper stuff a bit:
* make linux_kernel_2_6_22 return Bool

* linux_kernel_2_6_22: don't assert if /proc/sys/kernel/osrelease
  can't be opened

* PRE(sys_timerfd_create), PRE(sys_signalfd):
  use %ld for Word arguments, and use house types



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8138
2008-05-28 11:06:08 +00:00
Bart Van Assche
0f6897cc6c Removed the superfluous casts that were introduced in r8132.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8136
2008-05-28 07:09:54 +00:00
Bart Van Assche
dcf69a8cb2 sys_timerfd() and sys_signalfd() wrappers now interpret their first argument consistently as signed instead of unsigned. Fixes #162663.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8132
2008-05-26 17:16:08 +00:00
Julian Seward
22e711d457 Fix wrappers for sys_futimesat and sys_utimensat. (Dan Kegel)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8047
2008-05-12 14:29:23 +00:00
Bart Van Assche
bcb85a68fb Make sure the test for kernel version 2.6.22 will work correctly for the future kernel versions 2.6.220 .. 2.6.229.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7971
2008-05-01 12:35:48 +00:00
Bart Van Assche
c6d4c09e7c Added support for timerfd_create(), timerfd_gettime() and timerfd_settime() system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7942
2008-04-27 12:56:06 +00:00
Bart Van Assche
e31611fb5c Added support for epoll_pwait(), utimensat(), eventfd(), timerfd() and signalfd(). Fixes bug 160907.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7917
2008-04-26 07:45:10 +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
Tom Hughes
cbb3cb05a5 Add support for the sync_file_range system call.
Based on patch from Russell Sears <sears@cs.berkeley.edu>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7324
2008-01-08 16:31:25 +00:00
Tom Hughes
e25736ec6c Valid file descriptor argument to llseek system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7322
2008-01-08 13:54:43 +00:00
Julian Seward
931a40e83b Core-tool iface changes needed to support exp-drd (Bart Van Assche).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7212
2007-11-25 14:06:06 +00:00
Julian Seward
4d601bfed7 Support sys_utimensat on x86-linux. (Dan McGee)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7195
2007-11-20 23:41:23 +00:00
Julian Seward
29ff6066e9 Add a new flag, --child-silent-after-fork=no|yes [no]. When enabled,
causes child processes after fork to fall completely silent, which can
make the output a lot less confusing.  In addition it is pretty much
essential in XML output mode, so as to avoid mixing up any child XML
output with the parent's.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7177
2007-11-17 22:29:25 +00:00
Julian Seward
8dd547a530 Don't segfault on syscall (SYS_io_destroy, 0). (Jakub Jelinek) Fixes
#147325.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7170
2007-11-17 01:49:06 +00:00
Julian Seward
4044188f76 Add support for private futexes (whatever they might be). Patch from
Eric Dumazet.  Fixes #146781.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7169
2007-11-17 01:35:08 +00:00
Julian Seward
06666933d9 Merge (from branches/THRCHECK) the following two changes to the core-tool
interface:

r6805: Modify two thread-notification events in the core-tool
interface.  This removes track_post_thread_create and
track_post_thread_join.  The core can only see low level thread
creation and exiting, and has no idea about pthread-level concepts
like "pthread_create" and "pthread_join", so these are a bit
ambiguous.

Replace them with track_pre_thread_ll_create, which is notified before
a new thread makes any memory references, and
track_pre_thread_ll_exit, which is notified just before the new thread
exits, that is, after it has made its last memory reference.

r6823: Core-tool interface: give 'needs_tool_errors' an extra Boolean
indicating whether or not the core should print thread id's on error
messages.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7123
2007-11-09 23:21:44 +00:00
Julian Seward
77c7c9adc2 Handle sys_ioprio_set on amd64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6641
2007-03-11 19:28:02 +00:00
Tom Hughes
0075b20e84 Add support for linux key management system calls.
Based on patch from Ezra Peisach <epeisach@bu.edu>.
Fixes bug #139300.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6632
2007-03-07 11:12:13 +00:00
Julian Seward
b7302d9258 Get rid of the type XArrayStrings in m_clientstate and use new generic
equivalents in module m_xarray instead.  A suprisingly pervasive
change.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6616
2007-02-25 15:08:24 +00:00
Dirk Mueller
ac2bbadda5 implement support for AT_FDCWD in openat()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6566
2007-01-31 23:06:08 +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
Tom Hughes
69c8af5179 Improve prctl support - based on patch from Eric Pouech in bug #138627.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6410
2006-12-18 15:22:46 +00:00
Julian Seward
a96416a3e2 A naming-only change: rename VG_(set_running) to VG_(acquire_BigLock)
and VG_(set_sleeping) to VG_(release_BigLock).  And some other minor
renamings to the thread locking stuff, to make it easier to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6408
2006-12-17 18:58:55 +00:00
Julian Seward
bbe7f55813 Merge r6140 (some of):
- track SysRes changes

- track VG_(am_find_nsegment) const-ness change

- increase number of client syscall args supported from 6 to 8

- simplify type SyscallStatus.  Simply hold a copy of the SysRes
  for the syscall rather than have this be a data structure
  incorporating something very similar to the fields of a SysRes,
  and more besides.  Change various macros in priv_types_n_macros.h
  to match.

- syswrap-main.c: instantiate the various impedance-matching
  functions for AIX.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6276
2006-10-17 01:47:30 +00:00
Julian Seward
ae8215b3ac Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that.  Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.

include/pub_tool_basics.h previously dragged in the entire kernel
interface.  I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly.  This is why there are many modified .c files -- they have
all acquired an extra #include line.

This certainly breaks all platforms except x86.  Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225
2006-10-14 19:26:10 +00:00