743 Commits

Author SHA1 Message Date
Florian Krohm
bc494507f2 Synch s390x system call list with linux 2.6.39.2.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11845
2011-06-28 23:37:01 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Julian Seward
b4e2ade329 Fix 'make dist' following recent gdbserver commits.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11841
2011-06-27 23:31:07 +00:00
Julian Seward
2acd297ebe Fix #undefs that are inconsistent with those further up the file,
as spotted by Michael Meeks.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11829
2011-06-24 18:26:11 +00:00
Julian Seward
3e9f7836c5 Merge the contents of the HGDEV2 branch into trunk:
* performance and scalability improvements
* show locks held by both threads in a race
* show all 4 locks involved in a lock order violation
* better delimited error messages



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11824
2011-06-24 10:09:41 +00:00
Julian Seward
46d08c579d Minor GDBserver source tidying. Also a small usability fix: if
--vgdb-error=N is specified, print a bit of text telling the user the
magic commands to give GDB in order to attach to the process.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11822
2011-06-18 08:28:04 +00:00
Julian Seward
a12e858c35 Try to handle LL caches which are of size 50% above a power of 2 (eg,
6MB, 12MB) and have a non-power-of-2 number of sets.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11812
2011-06-13 13:14:00 +00:00
Tom Hughes
c5931781bc Teach cachegrind/callgrind how to parse the cache description
in the CPUID data on recent Intel processors.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11810
2011-06-10 15:04:22 +00:00
Tom Hughes
42bc84e869 Add support for prlimit64 on x86 and amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11806
2011-06-08 09:55:54 +00:00
Tom Hughes
8bc495c8d7 Update system call lists to match current kernel source.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11805
2011-06-08 09:12:07 +00:00
Tom Hughes
912fe51553 It seems that the perf_counter_open system call was renamed to
perf_event_open some time after we added it, so correct the name
wherever it appears to match the current kernel source.

Also fixup the PRE handler to do the check correctly, using the
size field of the structure to work out how much data there is.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11804
2011-06-08 09:10:40 +00:00
Julian Seward
b1a67076a2 Better checking for command line options that should be either 'yes'
or 'no'.  Fixes #269144.  (a125246@prtnx.com, Florian Krohm
<britzel@acm.org>)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11767
2011-05-17 16:29:29 +00:00
Bart Van Assche
9a36fe677e Get rid of the remaining "set but not used" warnings reported by gcc 4.6 by
swapping the roles of the VALGRIND_DO_CLIENT_REQUEST() and
VALGRIND_DO_CLIENT_REQUEST_EXPR() macros. Also, many __attribute__((unused))
declarations on variables have been eliminated. Closes #269778.

Note: so far this patch has been tested on x86/Linux, amd64/Linux and
ppc64/Linux but not yet on any other supported CPU/OS combination.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11755
2011-05-15 07:04:03 +00:00
Julian Seward
e22276cef0 Tidying up of branch-predict hint macros LIKELY/UNLIKELY. Fixes
#271504.  (Florian Krohm, britzel@acm.org)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11736
2011-05-09 21:54:44 +00:00
Julian Seward
b113473e03 ppc{32,64}-linux: mark VG_MINIMAL_LONGJMP as noreturn, since it is,
and not doing so leads to compiler warnings for functions that tail
call this one, which themselves are marked "attribute noreturn".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11732
2011-05-09 09:15:28 +00:00
Julian Seward
2ee9e90486 Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727
2011-05-06 21:02:55 +00:00
Bart Van Assche
d077061870 Linux/syswrap: add support for USBDEVFS_RESET (patch contributed by Brad Hards <bradh@frogmouth.net>).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11702
2011-04-18 10:37:56 +00:00
Julian Seward
e5a3e4f014 Add an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
for ppc32-linux, that works for gcc >= 4.4.  Related to #259977.
(modified version of patch from Maynard Johnson <maynardj@us.ibm.com>)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11689
2011-04-11 21:26:27 +00:00
Julian Seward
c2120cadde Add an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
for ppc32-linux, that works for gcc >= 4.4.  Related to #259977.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11688
2011-04-11 18:36:34 +00:00
Julian Seward
b3827d6c33 Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis.  Does not change any
functionality.  Related to #259977.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11687
2011-04-11 16:17:51 +00:00
Julian Seward
b8a03bdc8e Remove a bunch more warnings generated by gcc-4.6 about dead
assignments ("[-Wunused-but-set-variable]"), in the test suite.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11675
2011-03-28 21:19:00 +00:00
Bart Van Assche
9df672f236 Add VALGRIND_RESIZEINPLACE_BLOCK() and hence close #267819.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11666
2011-03-25 20:07:25 +00:00
Julian Seward
a17e55e5c2 Definitions relating to ptrace: replace bogus x86 versions with
arm specific versions.  Partial fix for #269079.
(Ulrich Weigand, uweigand@de.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11663
2011-03-24 11:33:00 +00:00
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
Bart Van Assche
c03eab7793 <valgrind/valgrind.h>: Made VALGRIND_PRINTF() and VALGRIND_PRINTF_BACKTRACE() definitions (with NVALGRIND defined) C89-compliant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11580
2011-03-04 16:55:56 +00:00
Julian Seward
62134f346f Back out r11568 (Add a new constructor for empty XArrays,
VG_(newSizedXA)) since r11571 removes the only use of the
functionality that r11568 introduces.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11573
2011-02-27 23:53:32 +00:00
Julian Seward
0c2371837b Add a new constructor for empty XArrays, VG_(newSizedXA). This is
identical to VG_(newXA) but allows passing in a size hint.  In the
case where the likely final size of the XArray is known at creation
time, this allows avoiding the repeated (implicit) resizing and
copying of the array as elements are added, which can save a vast
amount of dynamic memory allocation turnover.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11568
2011-02-23 13:22:24 +00:00
Julian Seward
c797ab7f0c Preserve the stack's 16-alignment in x86 and amd64 wrappers.
Fixes #254646.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11461
2010-10-20 15:58:09 +00:00
Julian Seward
dfb2ce8d2e Define VG_CLREQ_SZB correctly on ARM, so Cachegrind and Callgrind
don't assert in their regtests on ARM.  (Value is the same in both
ARM and Thumb mode, fortunately.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11432
2010-10-12 10:13:17 +00:00
Julian Seward
1a7379bf89 Enable support for sys_ppoll on arm-linux (Rodrigo Belem, rodrigo.belem@openbossa.org).
See #253636.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11428
2010-10-11 19:09:53 +00:00
Julian Seward
a1ae66b03f More unwind fixes for the amd64-linux CALL_FN_*_* macros, as per
bug 243270 comments 47 and 48:
* use __builtin_dwarf_cfa(), not __builtin_frame_address(0), to get the CFA
* use correct register specifier in VALGRIND_CFI_PROLOGUE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11416
2010-10-08 17:43:26 +00:00
Bart Van Assche
b8cadb97c9 Only enable CFI annotations when __GCC_HAVE_DWARF2_CFI_ASM is defined. This should work for all platforms, all gcc versions and with and without -fno-dwarf2-cfi-asm / -fno-asynchronous-unwind-tables. Thanks to Jakub Jelinek for the hint.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11415
2010-10-08 15:54:57 +00:00
Bart Van Assche
c72e780776 valgrind.h is again independent of config.h. Note: __builtin_frame_address()
is available since at least gcc 2.95.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11414
2010-10-08 06:58:25 +00:00
Julian Seward
321e034815 Fix build failure I introduced in r11408, duh.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11410
2010-10-07 10:46:15 +00:00
Julian Seward
5ecb22a89e Tidy up ifdeffery a bit. (non-functional change)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11408
2010-10-07 10:00:56 +00:00
Julian Seward
db5247b157 Fix build breakage on Darwin resulting from r11402 (see #243270),
by disabling creation of .cfi directives on Darwin, until such time
as someone can figure out how to do this.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11407
2010-10-07 10:00:04 +00:00
Julian Seward
78699f56cb Define VKI_SHMLBA on Darwin, so as to un-break build breakage caused by
r11399.  See #222545.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11405
2010-10-07 09:53:02 +00:00
Julian Seward
797fe272f2 amd64-linux: add suitable CFI annotations so that unwinding through
the CALL_FN_*_* macros works more reliably.  This is all very fiddly
and is described in a large comment in valgrind.h.  Fixes #243270.
(Evgeniy Stepanov, eugeni.stepanov@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11402
2010-10-06 22:07:06 +00:00
Julian Seward
878207ebb9 Define VKI_SHMLBA for all supported Linux targets, thereby unbreaking
the breakage created by r11399.  Part of #222545.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11400
2010-10-06 15:55:59 +00:00
Julian Seward
566a25cf7e Make client sys_shmat work properly on arm-linux by taking into
account rounding requirements to SHMLBA.  Modified version of a patch
by Kirill Batuzov, batuzovk@ispras.ru.  This fixes the main bug in
#222545.  Temporarily breaks the build on all other platforms though.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11399
2010-10-06 15:24:39 +00:00
Julian Seward
19bc251432 arm-linux: determine whether the host supports Neon by looking at our
AUXV at startup, rather than by trying to execute a Neon instruction
and seeing whether it SIGILLs.  Apparently the latter is not a
reliable way to ascertain the presence of usable Neon support.  Fixes
#249775.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11347
2010-09-09 07:25:58 +00:00
Bart Van Assche
34c6529193 Fixed an AMD64 bug reported by Evgeniy Stepanov: the order of
VALGRIND_CALL_NOREDIR_RAX and addq $128,%%rsp was wrong in CALL_FN_W_6W().
See also #243270.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11340
2010-09-05 12:10:25 +00:00
Bart Van Assche
22ddb6a319 Made declaration and definition of VG_(thread_get_stack_size)(ThreadId)
consistent.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11325
2010-09-02 14:41:05 +00:00
Bart Van Assche
0bf86ce7b9 Added functions for querying the properties of the alternate stack.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11324
2010-09-02 14:38:38 +00:00
Bart Van Assche
e79a688a66 Refactoring: introduced new macro VALGRIND_DO_CLIENT_REQUEST_EXPR() and used that macro to reimplement RUNNING_ON_VALGRIND.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11317
2010-09-02 09:33:02 +00:00
Tom Hughes
3d13995189 Add support for F_DUPFD_CLOEXEC. Fixes #238696.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11316
2010-09-02 08:23:35 +00:00
Bart Van Assche
661ab8260d Suppressed a few warnings reported by the Microsoft C Compiler.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11314
2010-09-01 10:18:36 +00:00
Bart Van Assche
d677d75fb2 Ported to Win32. Tested that both RUNNING_ON_VALGRIND and VALGRIND_PRINTF()
work with MinGW and Microsoft Visual Studio. Should close #210935.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11295
2010-08-27 10:05:27 +00:00
Julian Seward
ad584ebb64 Merge from branches/THUMB: m_machine changes needed for Thumb support:
* track guest_R15 -> guest_R15T renaming
* change min instruction size to 2
* tidy up VG_(get_IP) etc functions a bit
* add hwcaps detection code for ARM



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11283
2010-08-22 12:21:14 +00:00
Julian Seward
65e5f2fd0a Merge from branches/THUMB: add support for sys_pselect6, sys_pipe2,
sys_inotify_init1 on arm-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11280
2010-08-22 12:08:59 +00:00