8509 Commits

Author SHA1 Message Date
Julian Seward
ffc3968ff2 Give the amd64-linux and x86-linux dispatchers two entry points, not one,
so as to avoid a GSP-changed check in the common case.  See vex r2155.
(amd64-darwin and x86-darwin are now temporarily unbuildable.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11786
2011-05-29 09:34:30 +00:00
Julian Seward
3a131dc867 dispatch-x86-linux.S:
use test-based detection of GSP pointer changes.
   Saves one load per SB.

dispatch-amd64-linux.S:
   ditto

dispatch-amd64-linux.S:
   use movabsq to get &VG_(tt_fast) into a register,
   instead of an rsp-relative load from a constant pool.
   Saves a second load per SB.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11785
2011-05-28 17:07:53 +00:00
Julian Seward
84fa16228a Undo bogus comment changes committed in r11783.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11784
2011-05-28 16:58:45 +00:00
Julian Seward
55daaf1836 Test for guest-state-pointer changes by checking its lowest bit.
Removes one memory reference from the dispatcher loop.  As per r11781
for arm-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11783
2011-05-28 15:58:13 +00:00
Julian Seward
176e7d6218 Fix ppc64-linux build following introduction of IRStmt_Mark::delta
in vex r2153.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11782
2011-05-28 15:34:17 +00:00
Julian Seward
f8e9ab3607 Remove another memory reference from the arm dispatcher loop, by using
the fact that all {VG,VEX}_TRC_VALUES have their lowest bit set.  All
other targets can benefit from this trick too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11781
2011-05-28 11:05:44 +00:00
Julian Seward
3bcd288100 Get rid of a bunch of loads in the arm dispatcher inner loops, and
make some attempt to schedule for Cortex-A8.  Improves overall IPC
for none running perf/bz2.c "-O" from 0.879 to 0.925.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11780
2011-05-28 10:16:58 +00:00
Julian Seward
dd51367883 Further fixes for GDB server on Thumb code:
* Disabled several tests on ARM when gdb version < 7.1
  gdb 7.0 has problems with next/step/... in ARM thumb code.

* Documented in manual-core.xml that ARM thumb code implies
  a gdb version >= 7.1

* m_gdbserver.h/.c : take into account the thumb bit at several places

* use new IRStmt_IMark::delta field to distinguish ARM vs Thumb
  instructions as committed in vex r2153

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



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11779
2011-05-27 13:23:44 +00:00
Bart Van Assche
4c5fcff44c DRD: eliminate two redundant global variable definitions. See also #273536.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11778
2011-05-18 16:09:54 +00:00
Bart Van Assche
4bdf51c14b 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
2011-05-18 16:08:28 +00:00
Bart Van Assche
da5eddc400 Follow-up for r11770: added missing 'void' keyword.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11776
2011-05-18 16:04:46 +00:00
Bart Van Assche
97a0c3e5d1 Reverted r11774 because it didn't make sense.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11775
2011-05-18 15:51:51 +00:00
Bart Van Assche
1de28c3b2a Added missing extern keywords. Patch provided by Daniel Richard G. - closes #275536.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11774
2011-05-18 10:12:36 +00:00
Bart Van Assche
4ba7af4366 Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11773
2011-05-18 06:04:00 +00:00
Julian Seward
27d230b660 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
2011-05-17 21:35:41 +00:00
Julian Seward
77ea74b82e 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
2011-05-17 18:14:53 +00:00
Julian Seward
739bc05601 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
2011-05-17 17:15:07 +00:00
Bart Van Assche
773cf4f2eb drd/tests/pth_detached.c: eliminated thread_arg[] array and introduced PTHREAD_STACK_MIN.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11769
2011-05-17 16:45:08 +00:00
Julian Seward
4c205c2b43 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
2011-05-17 16:35:11 +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
Julian Seward
2184f38863 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
2011-05-17 16:19:53 +00:00
Julian Seward
c2aaad41cc Enable sys_pwrite64 on ppc64-linux. Fixes #272955.
(Maynard Johnson, maynardj@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11765
2011-05-17 16:07:33 +00:00
Julian Seward
c36bec1cc5 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
2011-05-17 15:54:31 +00:00
Julian Seward
0ffb0b1095 Update expected outputs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11763
2011-05-17 15:52:28 +00:00
Julian Seward
ea6aa5fd25 Make this test much more independent of glibc, and update outputs
accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11762
2011-05-17 15:36:01 +00:00
Julian Seward
fa642b19c5 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
2011-05-16 11:49:40 +00:00
Bart Van Assche
cf933f5dc4 Suppressed compiler warnings triggered by none/tests/amd64/fxtract.c too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11760
2011-05-15 17:53:26 +00:00
Bart Van Assche
1a2eb84398 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
2011-05-15 17:07:47 +00:00
Bart Van Assche
64a2d66bdf 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
2011-05-15 17:06:33 +00:00
Bart Van Assche
e04a1bbb64 Added configure tests for the compiler flags -Wno-nonnull and -Wno-overflow.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11757
2011-05-15 17:05:36 +00:00
Bart Van Assche
e9947dd263 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
2011-05-15 16:45:42 +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
Bart Van Assche
55962f8342 Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11754
2011-05-15 06:41:37 +00:00
Bart Van Assche
bdf797c009 gdbserver tests: only create the gdbserver_tests/gdb soft link if ./configure found gdb.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11753
2011-05-15 06:18:24 +00:00
Bart Van Assche
75f462e649 Skip gdbserver tests if ./configure did not find gdb.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11752
2011-05-15 06:07:57 +00:00
Bart Van Assche
29b06865ca gdbserver_tests/t.c: Fixed two occurrences of the same typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11751
2011-05-15 05:44:59 +00:00
Julian Seward
e9392d2bbc Remove old exp-ptrcheck tests which were never used.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11750
2011-05-12 19:15:06 +00:00
Julian Seward
f5fb84ba81 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
2011-05-12 16:38:56 +00:00
Julian Seward
619a546991 * 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
2011-05-11 22:54:57 +00:00
Josef Weidendorfer
8498c6ff81 Fixed bug 272661
Paths should be quoted in regexps (in callgrind_annotate).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11747
2011-05-11 16:45:52 +00:00
Josef Weidendorfer
0c8d0306ea Fix bug 267383
As suggested by Florian. Cachegrind already does the same.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11746
2011-05-11 16:32:18 +00:00
Julian Seward
b71e8bb6c5 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
2011-05-11 16:04:28 +00:00
Julian Seward
897fd70777 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
2011-05-11 15:31:24 +00:00
Julian Seward
c3617f305a Update the manual following removal of heap-check functionality.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11743
2011-05-11 15:26:06 +00:00
Josef Weidendorfer
1e4d49cc8c Fix bugs catched by BEAM
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11742
2011-05-11 12:28:01 +00:00
Julian Seward
77521499b3 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
2011-05-11 12:01:37 +00:00
Julian Seward
b37b05d214 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
2011-05-10 11:01:07 +00:00
Julian Seward
1930427ceb 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
2011-05-10 08:42:14 +00:00
Julian Seward
f8ca357dff 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
2011-05-09 22:51:14 +00:00
Julian Seward
c797d22c85 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
2011-05-09 22:42:06 +00:00