]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
15 years agoAdd a field 'UChar delta' to IRStmt_IMark, and use it to carry around
Julian Seward [Fri, 27 May 2011 13:20:56 +0000 (13:20 +0000)] 
Add a field 'UChar delta' to IRStmt_IMark, and use it to carry around
the T bit for the instruction when the instruction is a ARM/Thumb.
This more or less avoids introducing Thumb specific hacks in the IR,
yet makes it possible to identify, from an IMark, whether it refers to
a Thumb or ARM instruction.  This is important for the GDB server
integration to work properly on Thumb code.

Patch from bug 214909 comment 99 (vex part).
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

15 years agoDRD: eliminate two redundant global variable definitions. See also #273536.
Bart Van Assche [Wed, 18 May 2011 16:09:54 +0000 (16:09 +0000)] 
DRD: eliminate two redundant global variable definitions. See also #273536.

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

15 years agoDefine pass_signals[] only once such that Valgrind can be built with -fno-common...
Bart Van Assche [Wed, 18 May 2011 16:08:28 +0000 (16:08 +0000)] 
Define pass_signals[] only once such that Valgrind can be built with -fno-common. This is a modified version of the second patch attached to #273536.

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

15 years agoFollow-up for r11770: added missing 'void' keyword.
Bart Van Assche [Wed, 18 May 2011 16:04:46 +0000 (16:04 +0000)] 
Follow-up for r11770: added missing 'void' keyword.

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

15 years agoReverted r11774 because it didn't make sense.
Bart Van Assche [Wed, 18 May 2011 15:51:51 +0000 (15:51 +0000)] 
Reverted r11774 because it didn't make sense.

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

15 years agoAdded missing extern keywords. Patch provided by Daniel Richard G. - closes #275536.
Bart Van Assche [Wed, 18 May 2011 10:12:36 +0000 (10:12 +0000)] 
Added missing extern keywords. Patch provided by Daniel Richard G. - closes #275536.

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

15 years agoUpdated Subversion ignore list.
Bart Van Assche [Wed, 18 May 2011 06:04:00 +0000 (06:04 +0000)] 
Updated Subversion ignore list.

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

15 years agogdbserver: (#214909 c 91)
Julian Seward [Tue, 17 May 2011 21:35:41 +0000 (21:35 +0000)] 
gdbserver: (#214909 c 91)
add cleanup: line to none/tests/require-text-symbol-2.vgtest
In case Valgrind terminates abnormally, then no cleanup is done.
In this case, the abnormal termination is in the test which checks
--require-text-symbol=:*libc.so*:doesntexist
This patch adds a cleanup: line to the test.

(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

15 years agogdbserver: (#214909 c 82)
Julian Seward [Tue, 17 May 2011 18:14:53 +0000 (18:14 +0000)] 
gdbserver: (#214909 c 82)

ensure proper cleanup of gdbsrv FIFOs/shmem files with untraced fork/exec

* syswrap-{generic|darwin|aix5}.c : in PRE(sys_execve) : terminate gdbserver
* pub_core_gdbserver.h and m_gdbserver.c : add VG_(gdbserver_prerun_action),
  factorising the actions to do by gdbserver at "startup" (i.e. a traced
  fork or a traced exec).
* scheduler.c : implement startup action using VG_(gdbserver_prerun_action)

(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

15 years agogdbserver: misc fixes (#214909 c 77)
Julian Seward [Tue, 17 May 2011 17:15:07 +0000 (17:15 +0000)] 
gdbserver: misc fixes (#214909 c 77)
Fix some tests on ppc-debian6,s390x + handled Nick Nethercote, Josef
Weidendorfer comments

* improved testing & related doc
  - added option --vex-iropt-precise-memory-exns=yes to mcsig(no)pass.vgtest
    + updated manual-core.xml
  - cleanup some comments in *.vgtest
  - modified filter_gdb and filter_memcheck_monitor to
    handle specific ppc/debian6.0 mcsig(no)pass output
    handle specific s390x 'missing debug info'
  - added more information in README_DEVELOPPERS on how to
    investigate failing gdbserver tests.

* handled Nick Nethercote comment:
  Replaced kludgy ms.snapshot detailed
              by  ms.detailed_snaphot
  Updated documentation and test.

* handled Josef Weindendorfer comments:
   - do not report an error if ptrace_scope file can't be read.
     Instead, a debug trace is done if -d (debug) option given
   - added an option -l to give the list of active Valgrind
     gdbserver. Useful a.o. to support callgrind_control.
     Updated documentation
   - added ref. to  vgdb help in the vgdb --help message

(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

15 years agodrd/tests/pth_detached.c: eliminated thread_arg[] array and introduced PTHREAD_STACK_MIN.
Bart Van Assche [Tue, 17 May 2011 16:45:08 +0000 (16:45 +0000)] 
drd/tests/pth_detached.c: eliminated thread_arg[] array and introduced PTHREAD_STACK_MIN.

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

15 years agogdbserver: Fixes for ARM-Thumb (#214909 c 76)
Julian Seward [Tue, 17 May 2011 16:35:11 +0000 (16:35 +0000)] 
gdbserver: Fixes for ARM-Thumb (#214909 c 76)
fix arm thumb by transforming an address to its thumb form when needed

* added a function thumb_pc transforming a pc to its thumb form if needed
  (using an heuristic to guess if this is a thumb address)
* when program counter is modified by gdb, use thumb_pc
* use thumb_pc in monitor command vg.translate

(I was able to check that this improves inferior call on a small
thumb compiled executable + mcinfcallRU test) but I could not compile
all tests with thumb).

(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

15 years agoBetter checking for command line options that should be either 'yes'
Julian Seward [Tue, 17 May 2011 16:29:29 +0000 (16:29 +0000)] 
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

15 years agos390x: add test cases for STCK{,E,F} instructions. See #271779.
Julian Seward [Tue, 17 May 2011 16:19:53 +0000 (16:19 +0000)] 
s390x: add test cases for STCK{,E,F} instructions.  See #271779.
(Christian Borntraeger <borntraeger@de.ibm.com> and Divya Vyas)

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

15 years agos390x: provide clock instructions like STCK
Julian Seward [Tue, 17 May 2011 16:18:36 +0000 (16:18 +0000)] 
s390x: provide clock instructions like STCK
s390x provides user space accessible instructions to get the HW time (e.g. via
store clock STCK). while userspace programs should use gettimeofday and friends
to cope with ntp/system time etc, a lot of programs still make use of STCK.
valgrind should implement these instruction.
(Christian Borntraeger <borntraeger@de.ibm.com> and Divya Vyas)

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

15 years agoEnable sys_pwrite64 on ppc64-linux. Fixes #272955.
Julian Seward [Tue, 17 May 2011 16:07:33 +0000 (16:07 +0000)] 
Enable sys_pwrite64 on ppc64-linux.  Fixes #272955.
(Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoAdd entry w.r.t. the s390x port. (Florian Krohm <britzel@acm.org> and
Julian Seward [Tue, 17 May 2011 15:54:31 +0000 (15:54 +0000)] 
Add entry w.r.t. the s390x port.  (Florian Krohm <britzel@acm.org> and
Christian Borntraeger <borntraeger@de.ibm.com>)

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

15 years agoUpdate expected outputs.
Julian Seward [Tue, 17 May 2011 15:52:28 +0000 (15:52 +0000)] 
Update expected outputs.

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

15 years agoMake this test much more independent of glibc, and update outputs
Julian Seward [Tue, 17 May 2011 15:36:01 +0000 (15:36 +0000)] 
Make this test much more independent of glibc, and update outputs
accordingly.

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

15 years agoReorder tests poking around in the x86 instruction stream (sigh)
Julian Seward [Mon, 16 May 2011 11:49:40 +0000 (11:49 +0000)] 
Reorder tests poking around in the x86 instruction stream (sigh)
in order to try and avoid segfaults when we back up over a page
boundary.

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

15 years agoSuppressed compiler warnings triggered by none/tests/amd64/fxtract.c too.
Bart Van Assche [Sun, 15 May 2011 17:53:26 +0000 (17:53 +0000)] 
Suppressed compiler warnings triggered by none/tests/amd64/fxtract.c too.

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

15 years agogdbserver_tests/make_local_links: made invocation of "head" POSIX-compliant since...
Bart Van Assche [Sun, 15 May 2011 17:07:47 +0000 (17:07 +0000)] 
gdbserver_tests/make_local_links: made invocation of "head" POSIX-compliant since on some distros only the POSIX-compliant invocation is accepted.

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

15 years agoSilence compiler warnings triggered by certain regression tests programs and that...
Bart Van Assche [Sun, 15 May 2011 17:06:33 +0000 (17:06 +0000)] 
Silence compiler warnings triggered by certain regression tests programs and that we are not interested in.

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

15 years agoAdded configure tests for the compiler flags -Wno-nonnull and -Wno-overflow.
Bart Van Assche [Sun, 15 May 2011 17:05:36 +0000 (17:05 +0000)] 
Added configure tests for the compiler flags -Wno-nonnull and -Wno-overflow.

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

15 years agoRemoved "prereq: test -e gdb" again from those tests that do not invoke the script...
Bart Van Assche [Sun, 15 May 2011 16:45:42 +0000 (16:45 +0000)] 
Removed "prereq: test -e gdb" again from those tests that do not invoke the script gdbserver_tests/gdb.

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

15 years agoGet rid of the remaining "set but not used" warnings reported by gcc 4.6 by
Bart Van Assche [Sun, 15 May 2011 07:04:03 +0000 (07:04 +0000)] 
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

15 years agoUpdated Subversion ignore list.
Bart Van Assche [Sun, 15 May 2011 06:41:37 +0000 (06:41 +0000)] 
Updated Subversion ignore list.

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

15 years agogdbserver tests: only create the gdbserver_tests/gdb soft link if ./configure found...
Bart Van Assche [Sun, 15 May 2011 06:18:24 +0000 (06:18 +0000)] 
gdbserver tests: only create the gdbserver_tests/gdb soft link if ./configure found gdb.

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

15 years agoSkip gdbserver tests if ./configure did not find gdb.
Bart Van Assche [Sun, 15 May 2011 06:07:57 +0000 (06:07 +0000)] 
Skip gdbserver tests if ./configure did not find gdb.

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

15 years agogdbserver_tests/t.c: Fixed two occurrences of the same typo.
Bart Van Assche [Sun, 15 May 2011 05:44:59 +0000 (05:44 +0000)] 
gdbserver_tests/t.c: Fixed two occurrences of the same typo.

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

15 years agoRemove old exp-ptrcheck tests which were never used.
Julian Seward [Thu, 12 May 2011 19:15:06 +0000 (19:15 +0000)] 
Remove old exp-ptrcheck tests which were never used.

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

15 years agoDelete exp-sgcheck tests that are redundant following the removal of the
Julian Seward [Thu, 12 May 2011 16:38:56 +0000 (16:38 +0000)] 
Delete exp-sgcheck tests that are redundant following the removal of the
heap checking facilities.

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

15 years ago* fixed two bugs reported by the IBM BEAM checker:
Julian Seward [Wed, 11 May 2011 22:54:57 +0000 (22:54 +0000)] 
* fixed two bugs reported by the IBM BEAM checker:
     fd leak in vgdb.c
     break missing in valgrind-low-s390x.c

* use option --vgdb=full for the tests mcsigpass.vgtest and mcsignopass.vgtest
  This might improve these tests on ppc32/debian 6.0

* added a paragraph in gdbserver_tests/README_DEVELOPPERS to indicate
  how to report problems about failing gdbserver tests.

(bug 214909 comment 71, Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

15 years agoFixed bug 272661
Josef Weidendorfer [Wed, 11 May 2011 16:45:52 +0000 (16:45 +0000)] 
Fixed bug 272661

Paths should be quoted in regexps (in callgrind_annotate).

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

15 years agoFix bug 267383
Josef Weidendorfer [Wed, 11 May 2011 16:32:18 +0000 (16:32 +0000)] 
Fix bug 267383

As suggested by Florian. Cachegrind already does the same.

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

15 years agoRename 'exp-ptrcheck' to 'exp-sgcheck' and hope this does not cause
Julian Seward [Wed, 11 May 2011 16:04:28 +0000 (16:04 +0000)] 
Rename 'exp-ptrcheck' to 'exp-sgcheck' and hope this does not cause
too much build carnage.

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

15 years agoWhen reading Dwarf3 variable type and location information, print a
Julian Seward [Wed, 11 May 2011 15:31:24 +0000 (15:31 +0000)] 
When reading Dwarf3 variable type and location information, print a
line showing the number of variables read for each object.  Currently
disabled -- is a sanity-check mechanism for exp-sgcheck.

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

15 years agoUpdate the manual following removal of heap-check functionality.
Julian Seward [Wed, 11 May 2011 15:26:06 +0000 (15:26 +0000)] 
Update the manual following removal of heap-check functionality.

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

15 years agoARM front end only: when processing Thumb instructions, create
Julian Seward [Wed, 11 May 2011 14:17:35 +0000 (14:17 +0000)] 
ARM front end only: when processing Thumb instructions, create
IMark entries for the correct addresses.

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

15 years agoFix bugs catched by BEAM
Josef Weidendorfer [Wed, 11 May 2011 12:28:01 +0000 (12:28 +0000)] 
Fix bugs catched by BEAM

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

15 years agoRemove heap checking from exp-ptrcheck, leaving only the ability to
Julian Seward [Wed, 11 May 2011 12:01:37 +0000 (12:01 +0000)] 
Remove heap checking from exp-ptrcheck, leaving only the ability to
check for overruns of stack and global arrays.

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

15 years agoImprovements for testing and compilation breakage for the GDB server
Julian Seward [Tue, 10 May 2011 11:01:07 +0000 (11:01 +0000)] 
Improvements for testing and compilation breakage for the GDB server
on various platforms:

* In all gdbserver_tests using gdb:
  Made a more general way to remove the initial start message.

* tests using threads burning cpu modified to have only 1 thread.
  This makes them independent of the scheduler fairness.

* filter_gdb and filter_vgdb enhanced to anonymise
    some debian 6.0/ppc specific things
    some s390x/gdb 7.0, gdb 7.1  specific things

* vgdb.c: added an #include <linux/ptrace.h> to fix compilation
  on s390x fedora and suse. (Christian Boerntrager)

* fixed a bug in valgrind-low.c debug log :
  when a register size is 0, its image cannot be output (and register
  should not be transferred).

* added a parameter --keep-unfiltered to vg_regtest.in
  This will make it easier to update filter_gdb:
  in case gdbserver_tests are failing due to "artificial"
  differences to be filtered, re-run the tests using:
     perl tests/vg_regtest --keep-unfiltered gdbserver_tests
  Then a tar file with all the *.out in gdbserver_tests
  will allow me to better/faster update the filter_gdb.

* made a better detection of a working PTRACE_GETREGS at compile time
  and/or at run-time.

This is the patch on bug 214909 comment 69.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

15 years agoHandle executables created by the Xcode 3.2.x linker. These contain
Julian Seward [Tue, 10 May 2011 08:42:14 +0000 (08:42 +0000)] 
Handle executables created by the Xcode 3.2.x linker.  These contain
LC_DYSYMTAB sections that apparently the 4.0.x created ones don't.

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

15 years agoBack out r11705, which was an attempt to make reading of line number
Julian Seward [Mon, 9 May 2011 22:51:14 +0000 (22:51 +0000)] 
Back out r11705, which was an attempt to make reading of line number
info created by LLVM 2.9 work properly.  As per long discussion in
#272189, this isn't actually possible -- LLVM 2.9 creates bogus line
number info, and the bogusness can't be worked around at the Valgrind
end.

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

15 years agoVG_(mkstemp): fix infinite loop in the case where /tmp isn't
Julian Seward [Mon, 9 May 2011 22:42:06 +0000 (22:42 +0000)] 
VG_(mkstemp): fix infinite loop in the case where /tmp isn't
writable.  Fixes #223249.  (Florian Krohm, britzel@acm.org)

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

15 years agoTidying up of branch-predict hint macros LIKELY/UNLIKELY. Fixes
Julian Seward [Mon, 9 May 2011 21:54:44 +0000 (21:54 +0000)] 
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

15 years agoAdd LIKELY/UNLIKELY macros for general use, replacing s390x-specific
Julian Seward [Mon, 9 May 2011 21:45:04 +0000 (21:45 +0000)] 
Add LIKELY/UNLIKELY macros for general use, replacing s390x-specific
versions.  See #271504.  (Florian Krohm, britzel@acm.org)

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

15 years agoFix link flags so that 'vgdb' can be built on x86-darwin.
Julian Seward [Mon, 9 May 2011 21:33:32 +0000 (21:33 +0000)] 
Fix link flags so that 'vgdb' can be built on x86-darwin.

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

15 years agos390x: fix DISP20 macro. Remove duplicate defn and avoid problems of
Julian Seward [Mon, 9 May 2011 20:35:41 +0000 (20:35 +0000)] 
s390x: fix DISP20 macro.  Remove duplicate defn and avoid problems of
right-shifting negative values.  Fixes #272067.
(Florian Krohm, britzel@acm.org)

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

15 years agomemcheck: Fixed a bug in the address ranges reported in an error message. Closes...
Bart Van Assche [Mon, 9 May 2011 10:46:55 +0000 (10:46 +0000)] 
memcheck: Fixed a bug in the address ranges reported in an error message. Closes #272615.

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

15 years agoread_dwarf2_lineblock: debug printing fix (no functional change)
Julian Seward [Mon, 9 May 2011 09:19:32 +0000 (09:19 +0000)] 
read_dwarf2_lineblock: debug printing fix (no functional change)

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

15 years agoppc{32,64}-linux: mark VG_MINIMAL_LONGJMP as noreturn, since it is,
Julian Seward [Mon, 9 May 2011 09:15:28 +0000 (09:15 +0000)] 
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

15 years agoHandle Iop_I64UtoF32 in the ppc32/ppc64 insn selector. Fixes #270851.
Julian Seward [Sun, 8 May 2011 22:05:10 +0000 (22:05 +0000)] 
Handle Iop_I64UtoF32 in the ppc32/ppc64 insn selector.  Fixes #270851.
(Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoFix jump kind for indirect BLX for Thumb insns. Bug 266035 comment
Julian Seward [Sun, 8 May 2011 10:16:45 +0000 (10:16 +0000)] 
Fix jump kind for indirect BLX for Thumb insns.  Bug 266035 comment
14.  (Evgeniy Stepanov, eugeni.stepanov@gmail.com)

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

15 years agoUpdated Subversion ignore list.
Bart Van Assche [Sun, 8 May 2011 10:10:46 +0000 (10:10 +0000)] 
Updated Subversion ignore list.

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

15 years agoFollow-up for r11729: make the gdbserver regression tests pass again.
Bart Van Assche [Sun, 8 May 2011 10:10:04 +0000 (10:10 +0000)] 
Follow-up for r11729: make the gdbserver regression tests pass again.

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

15 years agoFixed one bug in gdbserver_tests/t.c and several compiler warnings triggered by the...
Bart Van Assche [Sun, 8 May 2011 09:29:06 +0000 (09:29 +0000)] 
Fixed one bug in gdbserver_tests/t.c and several compiler warnings triggered by the gdbserver test programs.

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

15 years agoAdded Subversion ignore list for directory gdbserver_tests.
Bart Van Assche [Sun, 8 May 2011 09:10:33 +0000 (09:10 +0000)] 
Added Subversion ignore list for directory gdbserver_tests.

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

15 years agoSupport DMB and DSB variants on Thumb. Bug 266035 comment 6.
Julian Seward [Sun, 8 May 2011 09:09:12 +0000 (09:09 +0000)] 
Support DMB and DSB variants on Thumb.  Bug 266035 comment 6.
(Jeff Brown, jeffbrown@google.com)

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

15 years agoImplement a GDB server in Valgrind. See #214909.
Julian Seward [Fri, 6 May 2011 21:02:55 +0000 (21:02 +0000)] 
Implement a GDB server in Valgrind.  See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

15 years agoFix an assertion failure caused by r2144 (improved assertions to do
Julian Seward [Thu, 5 May 2011 07:46:28 +0000 (07:46 +0000)] 
Fix an assertion failure caused by r2144 (improved assertions to do
with PPCCondCode).

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

15 years agoTighten up condition code handling in the back end, so as to placate
Julian Seward [Wed, 4 May 2011 09:50:48 +0000 (09:50 +0000)] 
Tighten up condition code handling in the back end, so as to placate
IBM's BEAM checker.  There is no error in the existing code.  However
BEAM doesn't know that when PPCCondCode::test == Pct_ALWAYS then the
::flag field is irrelevant, and so it believes it is being used
uninitialised.  Add a Pcf_NONE ::flag value for use in that case, and
add assertions to match.  (Untested!)

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

15 years agomkLazyN: fix incorrect type decl for 'mergeTy64', as spotted by IBM's
Julian Seward [Wed, 4 May 2011 09:09:31 +0000 (09:09 +0000)] 
mkLazyN: fix incorrect type decl for 'mergeTy64', as spotted by IBM's
BEAM checker.

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

15 years agoscalarts_limitations_fail_NORETURN: fix a format string error
Julian Seward [Wed, 4 May 2011 09:08:34 +0000 (09:08 +0000)] 
scalarts_limitations_fail_NORETURN: fix a format string error
spotted by IBM's BEAM checker.  (Why didn't gcc or clang see this?)

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

15 years agosetup_client_stack: use have_exename to consistently guard uses
Julian Seward [Wed, 4 May 2011 09:07:38 +0000 (09:07 +0000)] 
setup_client_stack: use have_exename to consistently guard uses
of VG_(args_the_exename), thereby avoiding a potential segfault.
Spotted by IBM's BEAM checker.

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

15 years agocalling format_message: when passing frameNo == -1, also pass
Julian Seward [Wed, 4 May 2011 09:06:17 +0000 (09:06 +0000)] 
calling format_message: when passing frameNo == -1, also pass
tid == VG_INVALID_THREADID rather than an uninitialised ThreadId.
Also in format_message, improve precondition assertions for
frameNo and tid.

There's no error in the current code since if frameNo == -1 then
tid is unused, but it caused IBM's BEAM checker to complain.

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

15 years agohandle_maybe_load_notifier: assert when symbol == NULL rather than
Julian Seward [Wed, 4 May 2011 09:03:41 +0000 (09:03 +0000)] 
handle_maybe_load_notifier: assert when symbol == NULL rather than
segfaulting.  Potential segfault was found by IBM's BEAM checker.

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

15 years agoVG_(env_unsetenv), VG_(env_clone): add assertions so as to cause
Julian Seward [Wed, 4 May 2011 09:01:58 +0000 (09:01 +0000)] 
VG_(env_unsetenv), VG_(env_clone): add assertions so as to cause
assertions instead of segfaults.  Potential segfaults were detected by
IBM's BEAM checker.

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

15 years agoSupport DMB and DSB variants on ARM. Bug 266035 comment 3.
Julian Seward [Tue, 3 May 2011 14:57:59 +0000 (14:57 +0000)] 
Support DMB and DSB variants on ARM.  Bug 266035 comment 3.
(Jeff Brown, jeffbrown@google.com)

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

15 years agoarm-linux: Set _start symbol alignment and type. Bug 266035 comment 1.
Julian Seward [Tue, 3 May 2011 14:24:11 +0000 (14:24 +0000)] 
arm-linux: Set _start symbol alignment and type.  Bug 266035 comment 1.
(Jeff Brown, jeffbrown@google.com)

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

15 years agoFix a bogus assertion observed by Florian Krohm.
Julian Seward [Tue, 3 May 2011 11:08:39 +0000 (11:08 +0000)] 
Fix a bogus assertion observed by Florian Krohm.

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

15 years agoFix a nonsensical assertion observed by Florian Krohm.
Julian Seward [Tue, 3 May 2011 07:51:49 +0000 (07:51 +0000)] 
Fix a nonsensical assertion observed by Florian Krohm.

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

15 years agoAdd a spec rule for V after SUB.
Julian Seward [Mon, 2 May 2011 18:57:56 +0000 (18:57 +0000)] 
Add a spec rule for V after SUB.

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

15 years agoSplit up armg_calculate_flags_nzcv into four functions that compute
Julian Seward [Mon, 2 May 2011 07:21:04 +0000 (07:21 +0000)] 
Split up armg_calculate_flags_nzcv into four functions that compute
the flags individually.  This seems to be a net performance win,
because often only one or two of the flags computed by
armg_calculate_flags_nzcv, so time was wasted computing the other
ones.

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

15 years agoImprovements to condition code handling on ARM.
Julian Seward [Sun, 1 May 2011 18:47:10 +0000 (18:47 +0000)] 
Improvements to condition code handling on ARM.

(1) guest_arm_spechelper: add another spec rule for
    armg_calculate_condition.  Add a spec rules for
    armg_calculate_flag_c and armg_calculate_flag_v.

(2) guest_arm_toIR.c: when storing oldC (shifter carry out) and
    oldV values in the thunk, be sure to ensure the top 31 bits
    are zero.  This improves the effectiveness of the new spec
    rules (1) by avoiding getting into situations where we have
    Mux0X(c, x, And32(x,1)), where in fact x has bits 31:1 as
    zero.  iropt can't fold that out.  So make sure the spec
    rules don't generate any unnecessary And32(x,1); hence the
    above becomes Mux0X(c, x, x) which iropt can reduce simply
    to "x".

(3) armg_calculate_flags_nzcv: assert condition (2) wherever
    possible.

These changes drastically improve --tool=none performance in some
cases (eg, perf/fbench with softfloat is doubled in speed).

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

15 years agoWhen simplifying (improving) the IR generated by the ARM front end, do
Julian Seward [Sun, 1 May 2011 18:36:51 +0000 (18:36 +0000)] 
When simplifying (improving) the IR generated by the ARM front end, do
CSE by default.  This significantly improves performance for ARM (not
Thumb) code that leans heavily on predicated instructions by commoning
up duplicate condition code evaluations within a single IRSB.

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

15 years agoDRD: fix issues reported by the IBM static analysis tool.
Bart Van Assche [Sat, 30 Apr 2011 07:27:41 +0000 (07:27 +0000)] 
DRD: fix issues reported by the IBM static analysis tool.

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

15 years agoHandle Iop_Not64 when doing 32-bit code generation. Also, assert that
Julian Seward [Thu, 28 Apr 2011 21:03:54 +0000 (21:03 +0000)] 
Handle Iop_Not64 when doing 32-bit code generation.  Also, assert that
iselWordExpr_R is not asked to handle Iop_Not64 in 32-bit mode.
Fixes #270856.  (Maynard Johnson, maynardj@us.ibm.com)

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

15 years agos390x : misc cleanups
Julian Seward [Thu, 28 Apr 2011 20:14:48 +0000 (20:14 +0000)] 
s390x : misc cleanups

- Forgotten cleanups in none/tests/s390x/Makefile.am

Partial fix for #271501.  (Florian Krohm, britzel@acm.org)

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

15 years agos390x : misc cleanups
Julian Seward [Thu, 28 Apr 2011 20:13:45 +0000 (20:13 +0000)] 
s390x : misc cleanups

- Remove fixs390 regarding storing the instruction address in the
  IP_AT_SYSCALL slot in the guest state. I'm not sure this is used
  but it certainly makes sense.

- Remove fixs390 in function s390_irgen_XONC. This was missed in
  VEX r2113.

Partial fix for #271501. (Florian Krohm, britzel@acm.org)

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

15 years agos390x: Implement Ist_MBE
Julian Seward [Thu, 28 Apr 2011 18:48:06 +0000 (18:48 +0000)] 
s390x: Implement Ist_MBE
VEX IR provides the statement Ist_MBE which is used to implement memory
barriers (Imbe_Fence). We use this statement to implement serialization which
is similar.
Fixes #271385.  (Florian Krohm, britzel@acm.org)

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

15 years agos390x: fix code confusion
Julian Seward [Thu, 28 Apr 2011 18:38:42 +0000 (18:38 +0000)] 
s390x: fix code confusion
Fix an enum-type mixup found by the IBM checker.
Fixes #271259.  (Florian Krohm, britzel@acm.org)

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

15 years agosyswrap/Linux: trace ioctl() calls only once / do not report two-argument
Bart Van Assche [Thu, 28 Apr 2011 18:36:49 +0000 (18:36 +0000)] 
syswrap/Linux: trace ioctl() calls only once / do not report two-argument
ioctl() calls as an error. Patch provided by Mark Hills. Closes #272730.

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

15 years agoChange the TT_FAST hash function for from "insn_address >> 2" to
Julian Seward [Thu, 28 Apr 2011 14:58:15 +0000 (14:58 +0000)] 
Change the TT_FAST hash function for from "insn_address >> 2" to
"insn_address >> 1".  The former is appropriate for ARM code, where
all insns are 4-sized and 4-aligned, but not for Thumb code, where the
minimum size and alignment is 2.  The old scheme happened to work for
Thumb (indeed, any hash function would), but caused huge amounts of
conflict misses in the fast cache for some programs.

The change has been observed to reduce conflict misses by up to 100
times, and in some cases, improves performance significantly for Thumb
code.  Performance of ARM code is unchanged or possibly a bit worse.

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

15 years agoChange the default (minimum) client malloc alignment from 8 to 16
Julian Seward [Wed, 27 Apr 2011 23:25:15 +0000 (23:25 +0000)] 
Change the default (minimum) client malloc alignment from 8 to 16
on ppc32-linux.  This is needed to make Altivec-using code work
correctly.  Noticed when running ./auxprogs/gsl16test with gcc-4.6
with args -mcpu=970 -g -O3 -ftree-vectorize on Memcheck, in
which case a few of the tests failed because malloc() returns
8 byte aligned memory when it should return 16-aligned memory.

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

15 years agoFix no-arg ioctls on Darwin.
Robert Walsh [Wed, 27 Apr 2011 19:04:31 +0000 (19:04 +0000)] 
Fix no-arg ioctls on Darwin.

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

15 years agos390x: invalid use of R0 as base register
Julian Seward [Wed, 27 Apr 2011 12:07:01 +0000 (12:07 +0000)] 
s390x: invalid use of R0 as base register
When emitting code for a shift operation with the shift amount operand being in
memory we load the shift amount into R0 and use that register in SLAG etc..
That won't work because the contents of R0 will be ignored when used as a base
reg.
So, let's choose some other register and save/restore it.

Fixes #270959.  (Florian Krohm, britzel@acm.org)

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

15 years agos390x: fpr - gpr transfer facility -- valgrind side fixes,
Julian Seward [Wed, 27 Apr 2011 12:00:51 +0000 (12:00 +0000)] 
s390x: fpr - gpr transfer facility -- valgrind side fixes,
and test cases.  Fixes #268619.
(Florian Krohm, britzel@acm.org)

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

15 years agos390x: fpr - gpr transfer facility
Julian Seward [Wed, 27 Apr 2011 11:58:22 +0000 (11:58 +0000)] 
s390x: fpr - gpr transfer facility
We need to introduce a new hwcap to model the presence of the fpr - gpr
transfer facility. If it is not available, we cannot use the LDGR and LGDR
insns and need to use a trick similar to what ppc does (write/read stack
location).
Fixes #268619 (vex side).
(Florian Krohm, britzel@acm.org)

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

15 years agoFix bogus asm constraints in jm-insns.c. Fixes #263919.
Julian Seward [Wed, 27 Apr 2011 11:33:44 +0000 (11:33 +0000)] 
Fix bogus asm constraints in jm-insns.c.  Fixes #263919.
(Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoAdd alternative expected output cases for more recent glibcs (eg,
Julian Seward [Wed, 27 Apr 2011 11:11:22 +0000 (11:11 +0000)] 
Add alternative expected output cases for more recent glibcs (eg,
2.12), which print a minus sign for NaNs.  Fixes #262989.
(Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoFix up incorrect usage of Iop_I64UtoF32 in the PowerPC front and back
Julian Seward [Wed, 27 Apr 2011 10:07:42 +0000 (10:07 +0000)] 
Fix up incorrect usage of Iop_I64UtoF32 in the PowerPC front and back
ends.  Partial fix for #270851.

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

15 years agoFix a bunch of printf format-string warnings when compiling this "-m64".
Julian Seward [Wed, 27 Apr 2011 08:09:37 +0000 (08:09 +0000)] 
Fix a bunch of printf format-string warnings when compiling this "-m64".

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

15 years agoFix up some enum confusion to do with ARMNeonUnOp and ARMNeonUnOpS, as
Julian Seward [Wed, 27 Apr 2011 07:02:44 +0000 (07:02 +0000)] 
Fix up some enum confusion to do with ARMNeonUnOp and ARMNeonUnOpS, as
found by "the IBM checker", and also by clang-2.9.  Fixes #271820.
(Florian Krohm, britzel@acm.org)

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

15 years agoFix up enum confusion between PPCAvOp and PPCAvFpOp, as found by
Julian Seward [Tue, 26 Apr 2011 21:36:09 +0000 (21:36 +0000)] 
Fix up enum confusion between PPCAvOp and PPCAvFpOp, as found by
"the IBM checker", and also by clang-2.9.  Fixes #271579.
(Florian Krohm, britzel@acm.org)

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

15 years agoFix a type mismatch that gcc-4.6 warns about.
Julian Seward [Tue, 26 Apr 2011 10:23:54 +0000 (10:23 +0000)] 
Fix a type mismatch that gcc-4.6 warns about.

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

15 years agoRemove some unused code that gcc-4.6 warns about.
Julian Seward [Tue, 26 Apr 2011 10:23:33 +0000 (10:23 +0000)] 
Remove some unused code that gcc-4.6 warns about.

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

15 years agoFix a couple of bogus asm constraints observed when trying to build
Julian Seward [Tue, 26 Apr 2011 07:52:44 +0000 (07:52 +0000)] 
Fix a couple of bogus asm constraints observed when trying to build
V with clang-2.9.

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

15 years agoFix a couple of warnings when building the regtests.
Julian Seward [Thu, 21 Apr 2011 23:05:49 +0000 (23:05 +0000)] 
Fix a couple of warnings when building the regtests.

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

15 years agoMake reading of line number info from LLVM-2.9-generated Dwarf3 work.
Julian Seward [Thu, 21 Apr 2011 08:55:51 +0000 (08:55 +0000)] 
Make reading of line number info from LLVM-2.9-generated Dwarf3 work.

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