]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
16 years agoFix up obviously-bogus FPO biasing a bit. Not that I have any idea if
Julian Seward [Sat, 30 Jan 2010 13:36:37 +0000 (13:36 +0000)] 
Fix up obviously-bogus FPO biasing a bit.  Not that I have any idea if
this helps at all.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11035

16 years agoMake the FPO reader much more robust against apparently nonsensical
Julian Seward [Sat, 30 Jan 2010 13:07:08 +0000 (13:07 +0000)] 
Make the FPO reader much more robust against apparently nonsensical
FPO tables.  Also, improve debug printing for FPO reading.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11034

16 years agoPE/PDB handling: allow the PDB (the debuginfo file) to be up to 1
Julian Seward [Fri, 29 Jan 2010 22:37:02 +0000 (22:37 +0000)] 
PE/PDB handling: allow the PDB (the debuginfo file) to be up to 1
minute older than the PE (the .exe/.dll it describes) even though this
doesn't seem particularly safe.  Partially fixes #190675.
(patch from Dan Kegel)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11033

16 years agoFollowup fix to r11006. Don't pass va_list by value through client
Julian Seward [Thu, 28 Jan 2010 15:23:54 +0000 (15:23 +0000)] 
Followup fix to r11006.  Don't pass va_list by value through client
requests, since there's no guarantee it is the same size as a machine
word.

This renames the private client request VG_USERREQ__INTERNAL_PRINTF to
VG_USERREQ__INTERNAL_PRINTF_VALIST_BY_REF and changes the
argument-passing accordingly.

The public client requests VG_USERREQ__PRINTF and
VG_USERREQ__PRINTF_BACKTRACE are now deprecated, and handled only in
the case where sizeof(UWord) == sizeof(va_list).  In all other cases V
will now print a detailed error message and abort.  This breaks binary
compatibility of apps compiled using VALGRIND_PRINTF and
VALGRIND_PRINTF_BACKTRACE, but that's not easy to avoid.

VG_USERREQ__PRINTF and VG_USERREQ__PRINTF_BACKTRACE are now replaced
by VG_USERREQ__PRINTF_VALIST_BY_REF and
VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF.  The end-user macros
VALGRIND_PRINTF and VALGRIND_PRINTF_BACKTRACE have been adjusted to
use these new requests instead.

Overall result is that source level compatibility of code using
VALGRIND_PRINTF{,_BACKTRACE} is retained, but binary level
compatibility may be broken, necessitating a rebuild of code using
these macros.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11032

16 years agoFix handling of mprotect so as to be more consistent with the handling
Julian Seward [Wed, 27 Jan 2010 10:28:00 +0000 (10:28 +0000)] 
Fix handling of mprotect so as to be more consistent with the handling
of mmap.  Fixes #205541 and its dup #210268.  The fix is simple enough
but the analysis is a bit complex, as detailed in comments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11031

16 years agoFix up debug printing for the PDB reader, so it can be properly
Julian Seward [Tue, 26 Jan 2010 13:26:41 +0000 (13:26 +0000)] 
Fix up debug printing for the PDB reader, so it can be properly
controlled from the command line.  Recommended flags are

-v --trace-symtab=yes "--trace-symtab-patt=*nameofinteresting.exe"

Also print entry/exit information for DEBUG_SnarfCodeView and
DEBUG_SnarfLinetab.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11030

16 years agoMake generated pkgconfig file reflect the new locations of the
Tom Hughes [Thu, 21 Jan 2010 10:24:37 +0000 (10:24 +0000)] 
Make generated pkgconfig file reflect the new locations of the
installed libraries. Patch from Jakub Jelinek. Closes #223657.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11029

16 years agoDW_OP_mod should do unsigned arithmetic. Closes #223656.
Tom Hughes [Thu, 21 Jan 2010 10:19:46 +0000 (10:19 +0000)] 
DW_OP_mod should do unsigned arithmetic. Closes #223656.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11028

16 years agox86/amd64 front ends: don't chase a conditional branch that leads
Julian Seward [Sun, 17 Jan 2010 15:47:01 +0000 (15:47 +0000)] 
x86/amd64 front ends: don't chase a conditional branch that leads
back to the start of the trace.  It's better to leave the IR loop
unroller to handle such cases.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1959

16 years agoUpdated Subversion ignore list.
Bart Van Assche [Sun, 17 Jan 2010 11:02:23 +0000 (11:02 +0000)] 
Updated Subversion ignore list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11027

16 years agoEnable (optionally) chasing through conditional branches during trace
Julian Seward [Sun, 17 Jan 2010 09:36:11 +0000 (09:36 +0000)] 
Enable (optionally) chasing through conditional branches during trace
construction, on ARM.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1958

16 years agoAdd command line flag --vex-guest-chase-cond=no|yes [no] to control
Julian Seward [Fri, 15 Jan 2010 10:57:57 +0000 (10:57 +0000)] 
Add command line flag --vex-guest-chase-cond=no|yes [no] to control
whether front ends should speculatively chase through conditional
branches.  Disabled by default.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11026

16 years agoAdd logic to allow front ends to speculatively continue adding guest
Julian Seward [Fri, 15 Jan 2010 10:53:21 +0000 (10:53 +0000)] 
Add logic to allow front ends to speculatively continue adding guest
instructions into IRSBs (superblocks) after conditional branches.
Currently only the x86 and amd64 front ends support this.  The
assumption is that backwards conditional branches are taken and
forwards conditional branches are not taken, which is generally
regarded as plausible and is particularly effective with code compiled
by gcc at -O2, -O3 or -O -freorder-blocks (-freorder-blocks is enabled
by default at -O2 and above).

Is disabled by default.  Has been seen to provide notable speedups
(eg, --tool=none for perf/bz2), and reduces the number of
block-to-block transitions dramatically, by up to half, but usually
makes programs run more slowly.  Increases the amount of generated
code by at least 15%-20% and so is a net liability in terms of icache
misses and JIT time.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1957

16 years agoamd64: add a couple more spec cases: NLE after SUBL, and NZ after LOGICB.
Julian Seward [Fri, 15 Jan 2010 09:54:55 +0000 (09:54 +0000)] 
amd64: add a couple more spec cases: NLE after SUBL, and NZ after LOGICB.
x86: add commented out (ATC) spec case for C flag after SMULL.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1956

16 years agoApparently the dynamic linker on ARM-Linux has soname "ld-linux.so.3"
Julian Seward [Mon, 11 Jan 2010 13:02:19 +0000 (13:02 +0000)] 
Apparently the dynamic linker on ARM-Linux has soname "ld-linux.so.3"
rather than "ld-linux.so.2".  No, don't ask me why.  Anyway, on
Helgrind, don't instrument code in ld-linux.so.3.  This makes Helgrind
pretty much usable on ARM-Linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11025

16 years agoFor 32-bit reads of integer guest registers, generate a 64-bit Get
Julian Seward [Mon, 11 Jan 2010 10:46:18 +0000 (10:46 +0000)] 
For 32-bit reads of integer guest registers, generate a 64-bit Get
followed by a Iop_64to32 narrowing, rather than doing a 32-bit Get.
This makes the Put-to-Get-forwarding optimisation work seamlessly for
code which does 32-bit register operations (very common), which it
never did before.  Also add a folding rule to remove the resulting
32-to-64-to-32 widen-narrow chains.

This reduces the amount of code generated overall about 3%, but gives
a much larger speedup, of about 11% for Memcheck running perf/bz2.c.
Not sure why this is, perhaps due to reducing store bandwidth
requirements in the generated code, or due to avoiding
store-forwarding stalls when writing/reading the guest state.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1955

16 years agoAdd tests for PLD (cache-prefetch-hint) instructions.
Julian Seward [Sat, 9 Jan 2010 11:44:21 +0000 (11:44 +0000)] 
Add tests for PLD (cache-prefetch-hint) instructions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11024

16 years ago* support PLD (cache-preload-hint) instructions
Julian Seward [Sat, 9 Jan 2010 11:43:21 +0000 (11:43 +0000)] 
* support PLD (cache-preload-hint) instructions
* start of a framework for decoding instructions in NV space
* fix a couple of unused/untested RRX shifter operand cases

git-svn-id: svn://svn.valgrind.org/vex/trunk@1954

16 years agoGeneralise X11 suppressions somewhat, and add a suppression needed for
Julian Seward [Fri, 8 Jan 2010 10:53:04 +0000 (10:53 +0000)] 
Generalise X11 suppressions somewhat, and add a suppression needed for
Ubuntu 9.10 on amd64.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11023

16 years agoUpdate expected output.
Julian Seward [Fri, 8 Jan 2010 10:51:25 +0000 (10:51 +0000)] 
Update expected output.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11022

16 years agoAdd the arm exp-bbv tests Makefile to the main configure.in file.
Vince Weaver [Wed, 6 Jan 2010 15:22:11 +0000 (15:22 +0000)] 
Add the arm exp-bbv tests Makefile to the main configure.in file.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11021

16 years agoAdd arm regression tests for exp-bbv tool.
Vince Weaver [Wed, 6 Jan 2010 15:15:28 +0000 (15:15 +0000)] 
Add arm regression tests for exp-bbv tool.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11020

16 years agoarm-linux: remove wrappers for __NR_ipc, __NR_mmap, __NR_sigsuspend
Julian Seward [Wed, 6 Jan 2010 11:08:18 +0000 (11:08 +0000)] 
arm-linux: remove wrappers for __NR_ipc, __NR_mmap, __NR_sigsuspend
and __NR_sigaction, which all did I_die_here and therefore can never
have been used.  I think they were here as a result of this file being
derived from the x86-linux version, and that arm-linux uses more
modern equivalents (mmap2, rt_sig*, and the broken-out versions of
ipc).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11019

16 years agoPass sys_cacheflush along to VG_(discard_translations), so we have
Julian Seward [Wed, 6 Jan 2010 10:22:25 +0000 (10:22 +0000)] 
Pass sys_cacheflush along to VG_(discard_translations), so we have
transparent zero-cost self-modifying code support on ARM.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11018

16 years agoDisable pid caching for print output: it's wrong in a child after
Julian Seward [Mon, 4 Jan 2010 21:49:25 +0000 (21:49 +0000)] 
Disable pid caching for print output: it's wrong in a child after
a fork() and is very confusing.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11017

16 years agoEnable pread64 on arm-linux.
Julian Seward [Mon, 4 Jan 2010 21:05:42 +0000 (21:05 +0000)] 
Enable pread64 on arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11016

16 years agoUpdated expected output after recent updates in the stack backtrace code.
Bart Van Assche [Mon, 4 Jan 2010 15:01:44 +0000 (15:01 +0000)] 
Updated expected output after recent updates in the stack backtrace code.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11015

16 years agoAnalysis/make-it-work for arm-linux.
Julian Seward [Mon, 4 Jan 2010 12:10:24 +0000 (12:10 +0000)] 
Analysis/make-it-work for arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11014

16 years agoReverted r11010 because it was wrong.
Bart Van Assche [Mon, 4 Jan 2010 12:04:38 +0000 (12:04 +0000)] 
Reverted r11010 because it was wrong.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11013

16 years agoEnable origin tracking through arm VFP registers; was apparently
Julian Seward [Mon, 4 Jan 2010 11:48:19 +0000 (11:48 +0000)] 
Enable origin tracking through arm VFP registers; was apparently
previously not enabled only due to brain-deadness on my part.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11012

16 years agoUpdated expected output following bug fixes some time back by Ashley
Julian Seward [Mon, 4 Jan 2010 11:15:24 +0000 (11:15 +0000)] 
Updated expected output following bug fixes some time back by Ashley
Pittman.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11011

16 years agoMerged tc23_bogus_condwait.stderr.exp-linux-x86 and -ppc.
Bart Van Assche [Mon, 4 Jan 2010 10:49:48 +0000 (10:49 +0000)] 
Merged tc23_bogus_condwait.stderr.exp-linux-x86 and -ppc.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11010

16 years agoFix building of these regtests on Darwin. Not sure why they broke
Julian Seward [Mon, 4 Jan 2010 10:47:25 +0000 (10:47 +0000)] 
Fix building of these regtests on Darwin.  Not sure why they broke
in the first place.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11009

16 years agoDon't trash %ebx on x86-darwin; gcc doesn't like it and goes off to sulk.
Julian Seward [Mon, 4 Jan 2010 10:46:44 +0000 (10:46 +0000)] 
Don't trash %ebx on x86-darwin; gcc doesn't like it and goes off to sulk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11008

16 years agoUpdate arch_test.c properly for arm-linux, and add an entry to
Julian Seward [Mon, 4 Jan 2010 10:31:41 +0000 (10:31 +0000)] 
Update arch_test.c properly for arm-linux, and add an entry to
platform_test.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11007

16 years agoDon't assume that va_list can be casted to an unsigned word. Fixes
Julian Seward [Mon, 4 Jan 2010 01:01:02 +0000 (01:01 +0000)] 
Don't assume that va_list can be casted to an unsigned word.  Fixes
the build on arm-linux with gcc-4.4 or later.  Patch from Dmitry
Zhurikhin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11006

16 years agoInclude missing files in the tarball.
Julian Seward [Mon, 4 Jan 2010 00:59:05 +0000 (00:59 +0000)] 
Include missing files in the tarball.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11005

16 years agoAdd a test program for ARM v5 integer instructions, and also for some
Julian Seward [Sun, 3 Jan 2010 23:46:03 +0000 (23:46 +0000)] 
Add a test program for ARM v5 integer instructions, and also for some
v6 instructions.  (Johan Björk)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11003

16 years agoAdd the default stderr_filter for this directory; else no tests work.
Julian Seward [Sun, 3 Jan 2010 23:44:34 +0000 (23:44 +0000)] 
Add the default stderr_filter for this directory; else no tests work.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11002

16 years agoHandle Iop_SqrtF32.
Julian Seward [Sun, 3 Jan 2010 22:29:32 +0000 (22:29 +0000)] 
Handle Iop_SqrtF32.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11001

16 years agoFurther buildsystem bashing, in order to try and get something
Julian Seward [Sun, 3 Jan 2010 21:25:08 +0000 (21:25 +0000)] 
Further buildsystem bashing, in order to try and get something
make-dist-able.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11000

16 years agoMake sure the Memcheck tests are built on arm-linux using hardware
Julian Seward [Sun, 3 Jan 2010 21:24:09 +0000 (21:24 +0000)] 
Make sure the Memcheck tests are built on arm-linux using hardware
floating point, since the softfloat results are way different from the
hardware one (not to mention, V reports lots of accesses-below-the-SP
in the softfloat helper functions.)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10999

16 years agoTry to integrate none/tests/arm properly in the build system.
Julian Seward [Sun, 3 Jan 2010 17:40:07 +0000 (17:40 +0000)] 
Try to integrate none/tests/arm properly in the build system.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10998

16 years agoDisable this test (effectively) on arm-linux, since that uses
Julian Seward [Sun, 3 Jan 2010 16:10:14 +0000 (16:10 +0000)] 
Disable this test (effectively) on arm-linux, since that uses
sys_rt_sigprocmask and not the Aulde Fashionede sys_sigprocmask.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10997

16 years agoarm-linux: handle sys_signalfd4 and sys_eventfd2. Makes
Julian Seward [Sun, 3 Jan 2010 11:46:50 +0000 (11:46 +0000)] 
arm-linux: handle sys_signalfd4 and sys_eventfd2.  Makes
memcheck/tests/linux-syscalls-2007 succeed on this platform.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10996

16 years agoPortability fix for arm-linux.
Julian Seward [Sun, 3 Jan 2010 11:39:01 +0000 (11:39 +0000)] 
Portability fix for arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10995

16 years agoHandle sys_pipe2 on arm-linux; also add some missing numbers to
Julian Seward [Sun, 3 Jan 2010 11:29:35 +0000 (11:29 +0000)] 
Handle sys_pipe2 on arm-linux; also add some missing numbers to
vki-scnums-arm-linux.h.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10994

16 years agoarm-linux: fake up the commpage entry at a lower level (in
Julian Seward [Sun, 3 Jan 2010 10:14:03 +0000 (10:14 +0000)] 
arm-linux: fake up the commpage entry at a lower level (in
parse_procselfmaps) so that the sync checker still works.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10993

16 years agoDon't force alignment for LDMxx/STMxx when presented with a misaligned
Julian Seward [Sun, 3 Jan 2010 01:20:59 +0000 (01:20 +0000)] 
Don't force alignment for LDMxx/STMxx when presented with a misaligned
address; instead just press on regardless.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1953

16 years agoVarious minor fixups to make ppc32/64-linux work again following
Julian Seward [Sat, 2 Jan 2010 13:24:58 +0000 (13:24 +0000)] 
Various minor fixups to make ppc32/64-linux work again following
recent ARM-Linux merge.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10992

16 years agogen{Spill,Reload}_PPC: track recent change in genSpill/Reload
Julian Seward [Sat, 2 Jan 2010 13:23:54 +0000 (13:23 +0000)] 
gen{Spill,Reload}_PPC: track recent change in genSpill/Reload
signature.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1952

16 years agoMake regtests build on arm-linux -- all changes are to do with
Julian Seward [Sat, 2 Jan 2010 10:43:23 +0000 (10:43 +0000)] 
Make regtests build on arm-linux -- all changes are to do with
assembly code for atomic memory modifications.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10991

16 years agoRedo r10971 ("Made sure that C++ compilers do not complain about the
Julian Seward [Sat, 2 Jan 2010 10:41:46 +0000 (10:41 +0000)] 
Redo r10971 ("Made sure that C++ compilers do not complain about the
_VKI_IOC_TYPECHECK() macro") in a way which is easier to understand.
Also, add it for arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10990

16 years agoTidy up determination of the PLAT_ macros a bit.
Julian Seward [Sat, 2 Jan 2010 10:37:58 +0000 (10:37 +0000)] 
Tidy up determination of the PLAT_ macros a bit.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10989

16 years agoinitUnwindContext: put back into the loop, some initialisations for
Julian Seward [Fri, 1 Jan 2010 20:56:13 +0000 (20:56 +0000)] 
initUnwindContext: put back into the loop, some initialisations for
ARM which were originally in the loop but inadvertantly got lifted out
during recent merging.  This appears to make stack unwinding work
again on ARM-Linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10988

16 years agoUnbreak stack unwinding on x86-linux and amd64-linux following merge
Julian Seward [Fri, 1 Jan 2010 19:55:17 +0000 (19:55 +0000)] 
Unbreak stack unwinding on x86-linux and amd64-linux following merge
of ARM CFI unwinding in r10986.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10987

16 years agoGenerate a couple more ARM specific offsets; also R1 on ppc32/64.
Julian Seward [Fri, 1 Jan 2010 19:19:08 +0000 (19:19 +0000)] 
Generate a couple more ARM specific offsets; also R1 on ppc32/64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1951

16 years agoMake the Dwarf3 CFI stack unwinding machinery work on arm-linux
Julian Seward [Fri, 1 Jan 2010 18:46:41 +0000 (18:46 +0000)] 
Make the Dwarf3 CFI stack unwinding machinery work on arm-linux
too.  This is a first step towards making not be completely
x86/amd64-linux specific, and so replaces some x86/amd64-specific
stuff with more general constructions:

* structure 'DiCfSI', into which the info is summarised, has been
  made target-specific (ugh), since the sets of registers to be
  unwound differ on different targets.

* enum CfiReg and the CFIC_ constants have been expanded
  accordingly, to handle both arm and x86/amd64 registers.

  The abbreviation "IA" (Intel Architecture) has been used in a
  few places where the x86 and amd64 definitions are shared.

* the CFI reader/summariser in readdwarf.c has been expanded &
  generalised appropriately.

* the DiCfSI evaluator in debuginfo.c, VG_(use_CFI_info), has
  also been generalised appropriately.

  The main change is that instead of passing around triples
  of (IP, SP, BP) values, a new structure 'D3UnwindRegs' is
  passed around instead.  This is defined differently for IA and
  ARM and succeeds in hiding at least some of the differences
  where we don't care about them.

  Note also, D3UnwindRegs duplicates, in purpose and structure,
  structure 'RegSummary' in priv_d3basics.h.  This will be tidied
  up in due course.

This commit almost certainly breaks stack unwinding on amd64-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10986

16 years agoMake Callgrind, DRD and Ptrcheck build on arm-linux.
Julian Seward [Fri, 1 Jan 2010 18:31:41 +0000 (18:31 +0000)] 
Make Callgrind, DRD and Ptrcheck build on arm-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10985

16 years agoDon't use -Wdeclaration-after-statement. We long since abandoned any
Julian Seward [Fri, 1 Jan 2010 18:30:59 +0000 (18:30 +0000)] 
Don't use -Wdeclaration-after-statement.  We long since abandoned any
pretense of being buildable with gcc prior to 3.0, hence there's no
point in having this flag.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10984

16 years agon-break build on x86-darwin following r10982.
Julian Seward [Fri, 1 Jan 2010 12:44:12 +0000 (12:44 +0000)] 
n-break build on x86-darwin following r10982.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10983

16 years agoMerge from branches/ARM, all parts of the ARM-Linux port except for
Julian Seward [Fri, 1 Jan 2010 11:59:33 +0000 (11:59 +0000)] 
Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982

16 years agoMake the x86 and amd64 back ends use the revised prototypes for
Julian Seward [Thu, 31 Dec 2009 19:26:03 +0000 (19:26 +0000)] 
Make the x86 and amd64 back ends use the revised prototypes for
genSpill and genReload.  ppc32/64 backends are still broken.
Also, tidy up associated pointer-type casting in main_main.c.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1950

16 years agoTrack changes in the names of a few IR primops to do with int<->fp
Julian Seward [Thu, 31 Dec 2009 19:24:12 +0000 (19:24 +0000)] 
Track changes in the names of a few IR primops to do with int<->fp
conversions, as introduced in vex r1949.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10980

16 years agoMerge r1925:1948 from branches/ARM. This temporarily breaks all other
Julian Seward [Thu, 31 Dec 2009 18:00:12 +0000 (18:00 +0000)] 
Merge r1925:1948 from branches/ARM.  This temporarily breaks all other
targets, because a few IR primops to do with int<->float conversions
have been renamed, and because an internal interface for creating
spill/reload instructions has changed.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1949

16 years agoFollow-up for r10972: added missing #include "config.h".
Bart Van Assche [Thu, 31 Dec 2009 13:31:11 +0000 (13:31 +0000)] 
Follow-up for r10972: added missing #include "config.h".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10978

16 years agoBuilds again on Darwin.
Bart Van Assche [Tue, 29 Dec 2009 17:30:16 +0000 (17:30 +0000)] 
Builds again on Darwin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10974

16 years agoRemoved dependency of include/pub_tool_basics.h on config.h.
Bart Van Assche [Tue, 29 Dec 2009 16:56:18 +0000 (16:56 +0000)] 
Removed dependency of include/pub_tool_basics.h on config.h.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10972

16 years agoMade sure that C++ compilers do not complain about the _VKI_IOC_TYPECHECK() macro.
Bart Van Assche [Tue, 29 Dec 2009 15:08:14 +0000 (15:08 +0000)] 
Made sure that C++ compilers do not complain about the _VKI_IOC_TYPECHECK() macro.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10971

16 years agoChanges:
Bart Van Assche [Tue, 29 Dec 2009 14:11:38 +0000 (14:11 +0000)] 
Changes:
- Made sure that C++ compilers do not complain about the header files
  include/pub_tool_libcassert.h and include/pub_tool_basics.h.
- Added the source file none/tests/valgrind_cpp_test.cpp. This source file
  is compiled together with the regression tests in order to verify that
  Valgrind's public header files compile cleanly with a C++ compiler.
These modifications are based on a patch provided by Konstantin Serebryany.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10970

16 years agoHandle adjtimex being called in adjtime mode correctly. Closes #219538.
Tom Hughes [Mon, 21 Dec 2009 11:29:54 +0000 (11:29 +0000)] 
Handle adjtimex being called in adjtime mode correctly. Closes #219538.
Validate the constant field with ADJ_TAI is used in an adjtimex call.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10969

16 years agoDocument the 'cc' parameter for OSet creation.
Nicholas Nethercote [Wed, 16 Dec 2009 02:39:39 +0000 (02:39 +0000)] 
Document the 'cc' parameter for OSet creation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10968

16 years agoCallgrind: fix bug 217849: Switch to running thread in CLG_(post_signal)
Josef Weidendorfer [Thu, 10 Dec 2009 19:26:32 +0000 (19:26 +0000)] 
Callgrind: fix bug 217849: Switch to running thread in CLG_(post_signal)

If instrumentation is switched off on multithreaded code,
multiple signals in a row handled by different threads could
confuse callgrind.
Callgrind assumed that in post_signal, it has the correct understanding
of the currently running thread. This is not always correct.
Really switch to running thread.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10966

16 years agoMade the description of DRD_TRACE_VAR(), ANNOTATE_TRACE_MEMORY() and
Bart Van Assche [Thu, 10 Dec 2009 17:58:46 +0000 (17:58 +0000)] 
Made the description of DRD_TRACE_VAR(), ANNOTATE_TRACE_MEMORY() and
VG_USERREQ__DRD_START_TRACE_ADDR more clear.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10965

16 years agoDouble the size of some table to do with reading CIEs.
Julian Seward [Thu, 3 Dec 2009 14:35:15 +0000 (14:35 +0000)] 
Double the size of some table to do with reading CIEs.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10964

16 years agoTesting hacklet, to fill the vex tmp allocation area before each
Julian Seward [Thu, 3 Dec 2009 09:50:38 +0000 (09:50 +0000)] 
Testing hacklet, to fill the vex tmp allocation area before each
translation, with 0x00 or 0xFF or whatever.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1938

16 years agoCope with prelink splitting the bss section of an ELF file into separate
Tom Hughes [Thu, 3 Dec 2009 09:50:32 +0000 (09:50 +0000)] 
Cope with prelink splitting the bss section of an ELF file into separate
dynbss and bss sections by merging them back together again.

This means that (a) we will find variables in the bss and (b) we won't
assert when there is a debuginfo file present where the bss is still
in one piece.

Patch from Jakub Jelinek, closes #217084.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10963

16 years agoIt seems whoever wrote the preadv and pwritev system calls in the
Tom Hughes [Wed, 2 Dec 2009 16:19:12 +0000 (16:19 +0000)] 
It seems whoever wrote the preadv and pwritev system calls in the
kernel decided it would be fun to make them always take the low word
of the offset argument before the high word regardless of the
endianism of the system... Consistency - they've heard of it...

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10962

16 years agoAdd some newlines to make signal debugging messages more readable.
Tom Hughes [Tue, 1 Dec 2009 10:25:12 +0000 (10:25 +0000)] 
Add some newlines to make signal debugging messages more readable.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10960

16 years agoTrack vex r1930 (Change the IR representation of load linked and store
Julian Seward [Thu, 26 Nov 2009 17:20:21 +0000 (17:20 +0000)] 
Track vex r1930 (Change the IR representation of load linked and store
conditional.)  Completes the fix of #215771.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10957

16 years agoChange the IR representation of load linked and store conditional.
Julian Seward [Thu, 26 Nov 2009 17:17:37 +0000 (17:17 +0000)] 
Change the IR representation of load linked and store conditional.
They are now moved out into their own new IRStmt kind (IRStmt_LLSC),
and are not treated merely as variants of standard loads (IRExpr_Load)
or store (IRStmt_Store).  This is necessary because load linked is a
load with a side effect (lodging a reservation), hence it cannot be an
IRExpr since IRExprs denote side-effect free value computations.

Fix up all front and back ends accordingly; also iropt.

Fixes #215771.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1930

16 years agoFix type in r10951. Not sure why this didn't cause a compilation
Julian Seward [Wed, 25 Nov 2009 13:57:47 +0000 (13:57 +0000)] 
Fix type in r10951.  Not sure why this didn't cause a compilation
error, but least on ppc32-linux it didn't.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10956

16 years agoAdd support for accept4 system call based on patch
Tom Hughes [Wed, 25 Nov 2009 12:05:41 +0000 (12:05 +0000)] 
Add support for accept4 system call based on patch
from Dodji Seketeli. Part fix for #215973.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10955

16 years agoWire up vhangup system call on amd64/ppc32/ppc64 linux platforms.
Tom Hughes [Wed, 25 Nov 2009 11:54:56 +0000 (11:54 +0000)] 
Wire up vhangup system call on amd64/ppc32/ppc64 linux platforms.
Patch from Dodji Seketeli. Part fix for #215973.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10954

16 years agoAdd support for fallocate system call on 32 bit (x86/ppc32) linux
Tom Hughes [Wed, 25 Nov 2009 11:51:05 +0000 (11:51 +0000)] 
Add support for fallocate system call on 32 bit (x86/ppc32) linux
systems based on patch from Dodji Seketeli. Part fix for #215973.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10953

16 years agoClean up support for sync_file_range system call and add second version used
Tom Hughes [Wed, 25 Nov 2009 11:29:14 +0000 (11:29 +0000)] 
Clean up support for sync_file_range system call and add second version used
by ppc platforms based on patch from Dodji Seketeli. Part fix for #215973.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10952

16 years agoRename LOHI64 to MERGE64 and make it work correctly on big endian
Tom Hughes [Wed, 25 Nov 2009 11:24:00 +0000 (11:24 +0000)] 
Rename LOHI64 to MERGE64 and make it work correctly on big endian
platforms. Also add MERGE64_FIRST and MERGE64_SECOND macros to help
produce the right argument names in error messages on big/little
endian platforms.

Based on patch from Dodji Seketeli. Part fix for #215973.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10951

16 years agoSplit long lines.
Bart Van Assche [Wed, 25 Nov 2009 07:29:34 +0000 (07:29 +0000)] 
Split long lines.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10950

16 years agoAdded to repository.
Bart Van Assche [Wed, 25 Nov 2009 07:24:07 +0000 (07:24 +0000)] 
Added to repository.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10949

16 years agoRe-enable old support for adjtimex system call based on patch
Tom Hughes [Tue, 24 Nov 2009 16:38:21 +0000 (16:38 +0000)] 
Re-enable old support for adjtimex system call based on patch
from Dodji Seketeli. Part fix for #215973.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10948

16 years agoAdd support for rt_tgsigqueueinfo system call based on patch
Tom Hughes [Tue, 24 Nov 2009 16:08:40 +0000 (16:08 +0000)] 
Add support for rt_tgsigqueueinfo system call based on patch
from Dodji Seketeli. Part fix for #215973.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10947

16 years agoAdd support for sched_rr_get_interval system call based on patch
Tom Hughes [Tue, 24 Nov 2009 16:03:19 +0000 (16:03 +0000)] 
Add support for sched_rr_get_interval system call based on patch
from Dodji Seketeli. Part fix for #215973.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10946

16 years agoHandle the dup3 system call. Closes #215448.
Tom Hughes [Mon, 23 Nov 2009 08:19:20 +0000 (08:19 +0000)] 
Handle the dup3 system call. Closes #215448.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10945

16 years agoUse a shorter instruction encoding for "mov $smallish positive int, %reg".
Julian Seward [Sun, 22 Nov 2009 23:43:17 +0000 (23:43 +0000)] 
Use a shorter instruction encoding for "mov $smallish positive int, %reg".
Reduces generated code size by about 1% for Memcheck.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1929

16 years agoSpecialise "S after 32-bit SUB/CMP"; improves performance by about 2%
Julian Seward [Sun, 22 Nov 2009 23:38:01 +0000 (23:38 +0000)] 
Specialise "S after 32-bit SUB/CMP"; improves performance by about 2%
for Memcheck running bzip2.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1928

16 years agoMake sure isIFunc is initialised whenever we add a symbol.
Tom Hughes [Mon, 16 Nov 2009 09:07:07 +0000 (09:07 +0000)] 
Make sure isIFunc is initialised whenever we add a symbol.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10944

16 years agoHandle the isIFunc flag when canonicalising the symbol table.
Tom Hughes [Mon, 16 Nov 2009 09:06:50 +0000 (09:06 +0000)] 
Handle the isIFunc flag when canonicalising the symbol table.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10943

16 years agoAssert that the indirect function wrapper exists if we encounter a
Tom Hughes [Mon, 16 Nov 2009 09:06:09 +0000 (09:06 +0000)] 
Assert that the indirect function wrapper exists if we encounter a
redirection for an indirect function.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10942

16 years agoAdded support for glibc 2.11.
Bart Van Assche [Sun, 15 Nov 2009 19:11:19 +0000 (19:11 +0000)] 
Added support for glibc 2.11.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10941

16 years agoVarious improvements to DWARF handling to cope with changes in recent
Tom Hughes [Thu, 12 Nov 2009 13:28:34 +0000 (13:28 +0000)] 
Various improvements to DWARF handling to cope with changes in recent
versions of gcc as shipped with Fedora 12. Specific changes include:

  - Vastly increase the number of opcodes we understand how to
    evaluate when processing a location expression.

  - Process frame unwind data from the debug_frame ELF section as
    well as the eh_frame section.

  - Handle version 3 CIEs in frame unwind data.

  - Handle the compact form of DW_AT_data_member_location which just
    gives a constant offset from the start of it's base type instead
    of a full location expression.

Based on patches from Jakub Jelinek on bugs #210479 and #210566.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10939