238 Commits

Author SHA1 Message Date
Julian Seward
01ac70be21 --> 3.8.0 final
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12866
2012-08-09 15:06:36 +00:00
Julian Seward
ccc74aefd3 Move older news into its own file, NEWS.old, so as not to overrun TeX
default memory limits when building the PDF docs.  Fixes #304754.
(Mark Wielaard, mjw@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12863
2012-08-08 20:38:03 +00:00
Philippe Waroquiers
2d90de0dfb Doc: remove 'is' in 'is replaces'
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12847
2012-08-05 17:23:55 +00:00
Julian Seward
60f5b47a01 Fix typo spotted by John Reiser.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12841
2012-08-05 14:59:39 +00:00
Julian Seward
9461b8012f Doc updates for 3.8.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12838
2012-08-05 13:44:15 +00:00
Philippe Waroquiers
36ca11463d Remove --vex-iropt-precise-memory-exns, implement --vex-iropt-register-updates
* Option --vex-iropt-precise-memory-exns has been removed.
  It is replaced by --vex-iropt-register-updates which accepts
  3 values : 'unwindregs-at-mem-access' (replacing
  --vex-iropt-precise-memory-exns=no), 'allregs-at-mem-access'
  (replacing --vex-iropt-precise-memory-exns=yes)
  and a new value 'allregs-at-each-insn'.
  'allregs-at-each-insn' allows the Valgrind gdbserver to always
  show up to date values to GDB.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12809
2012-08-01 22:03:12 +00:00
Philippe Waroquiers
d045b4236a Implement --redzone-size and --core-redzone-size
* For tools replacing the malloc library (e.g. Memcheck, Helgrind, ...),
  the option --redzone-size=<number> allows to control the padding 
  blocks (redzones) added before and after each client allocated block.
  Smaller redzones decrease the memory needed by Valgrind. Bigger
  redzones increase the chance to detect blocks overrun or underrun.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12807
2012-07-31 22:17:28 +00:00
Philippe Waroquiers
b30612fef7 re-re-clarify the doc about registers and flags gdbsrv up-to-date-ness
Following discussions on valdev and re-measurement, clarify the clarification.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12784
2012-07-25 21:58:40 +00:00
Philippe Waroquiers
668df8d006 Better document the limitation of gdbsrv for registers and flags values
During investigations of 303963, Josef found that flags are not always
up to date and that --vex-guest-max-insns=1 ensures flags values
are (more?) correct.

=> enhance the paragraph in the gdbserver limitations to reference
this option and give an idea of the performance impact of the other
options helping to increase the precision of registers and flags.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12778
2012-07-24 20:24:39 +00:00
Philippe Waroquiers
93f019ff73 fix 302709 valgrind for ARM needs extra tls support for android emulator
Allow Valgrind to run on android emulator.
+ added README.android_emulator giving some details about versions used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12710
2012-07-04 21:59:29 +00:00
Florian Krohm
5dec28d4af Increase allowed size of a back-trace to 500 frames.
This limit is large enough for all practical purposes. It exists
only to sanity check the value specified with --num-callers.
Be frugal in record_ExeContext_wrk and only allocate on the stack 
as many frames as needed. 
Testcase included.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12685
2012-06-29 21:20:52 +00:00
Petar Jovanovic
8dabfc8bef Adding README.mips to distribution documents.
Small change to dist-docs.xml to include README.mips.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12680
2012-06-28 09:58:05 +00:00
Philippe Waroquiers
4d7d9506ab Improve cross referencing of gdbserver monitor commands
Based on a suggestion and patch from Marc Bessieres 
(marc.bessieres@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12590
2012-05-28 08:56:24 +00:00
Philippe Waroquiers
e4a8d5e273 as vgdb not activated by default on android, need to fix the example
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12584
2012-05-25 22:36:01 +00:00
Philippe Waroquiers
2478728636 gdbserver: introduce support to show the AVX registers.
This implies to change the interface between the
arch independent gdbserver files and the arch dependent files
as AVX implies a choice of xml files at run time.

In valgrind-low-amd64.c, the xml files and the nr of registers
are different depending on AVX support or not.

Other platforms still have a fully static nr of registers.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12581
2012-05-24 21:33:17 +00:00
Philippe Waroquiers
0ea6d36f1d fix 219156 support static malloc or alternate malloc lib (e.g. tcmalloc) with new option --soname-synonyms
* pub_tool_redir.h : define the prefix to be used for "soname synonym"
  place holder
* vg_replace_malloc.c : define synonym place holder for malloc related
  functions
* m_redir.c : when detecting a soname synonym place holder redir spec, search
  in clo_soname_synonyms if there is a synonym pattern.
  If yes, replace the soname pattern. If not, ignore the redir spec.
* various files: implement or document the new clo --soname-synonyms
* new test memcheck/tests/static_malloc.vgtest



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12559
2012-05-11 19:33:46 +00:00
Philippe Waroquiers
f53053e7c9 add optional arg [aspacemgr] to v.info memory to show aspacemgr segments.
When investigating Valgrind out of memory situation,
it is useful to be able to output the list of segments of the
aspacemgr at any moment.
The GDB monitor command "v.info memory" has now an optional
argument allowing to output this list of segments



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12544
2012-04-27 22:59:43 +00:00
Philippe Waroquiers
39e18a06af (for x86 and amd64): Change the type of the shadow regs for floating point registers
Similar to r12444 (see Log below), but this is doing it for x86 and amd64.
The xmm registers are using uint32 or uint64 for their float
union components. For the i387 80 bits float registers, as there is
no uint80, a struct uint16 + uint64 is defined.


  Log:
    Change the type of the shadow regs for floating point registers
    to be uint64. Previously the value in such a shadow reg would
    be interpreted by gdb as a floating point value which would 
    produce non-sensible output for e.g   p/x $f1s1.
    This patch covers the power and arm architectures.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12445
2012-03-14 21:27:35 +00:00
Philippe Waroquiers
aa50a7e4df Allows to run regression tests in an outer/inner setup.
A '3 lines how to':
   perl tests/vg_regtest --outer-valgrind=../trunk_untouched/install/bin/valgrind --all
           (the outer results for a test xxx is in xxx.outer.log)
   To run with another tool (e.g. drd), add the argument --outer-tool=drd


Still to do/things to improve:

* Most (inner) tests are successful when running under an outer
  memcheck. Need to analyse the reasons of remaining failures.

* The memcheck annotations in m_mallocfree.c can be improved:
  - A superblock is marked 'undefined', it should rather be marked
    'no access'.
  - When a free block is splitted, the remaining free block is
    not made 'no access'. Instead, it is made 'undefined'.
      => this decreases the chance to find bugs.
      => this is not very efficient (e.g. the rest of a superblock
         is often marked undefined repetitively).
    Similarly, the free block created by VG_(arena_memalign)
    is marked 'undefined'. 'No access' would be preferrable.
  - mkInuseBlock marks the new block as undefined. This is probably
    not needed, as VALGRIND_MALLOCLIKE_BLOCK will do it already.
  - VG_(arena_malloc) should give the requested size to
    VALGRIND_MALLOCLIKE_BLOCK, not the malloc usable size,
    as this decreases the chance to find buffer overrun bugs.
    But giving the requested size is tricky (see comments in
    the code).

* need to do memcheck annotations in m_poolalloc.c
   so as to allow leak checking for pool allocated elements.

* vg_regtest.in
  - should analyse the results of the outer and should
    produce a separate result for the tests for which
    the outer detects an error or a memory leak or ...


Changes done:
   README_DEVELOPERS: document the new outer/inner features.
   manual-core.xml: document the new sim-hint no-inner-prefix
   tests/outer_inner.supp: new file, containing the suppressions for inner.
   vg_regtest.in: implement new args --outer-valgrind, --outer-tool, --outer-args.
   m_mallocfree.c: annotations for memcheck.
   m_libcprint.c: handle the new sim-hint no-inner-prefix
   m_main.c: do an (early) parse of --sim-hints




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12441
2012-03-11 22:24:03 +00:00
Philippe Waroquiers
c0883bddd7 * Improve documentation of --vgdb=full
* make a reference to --vex-iropt-precise-memory-exns=yes 
  to obtain up to date registers values.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12416
2012-03-05 22:09:20 +00:00
Philippe Waroquiers
74d44d1764 * README_DEVELOPERS : complete/enhance the section about outer/inner
* manual-core.xml : fix a typo
* include/pub_tool_inner.h : new file, defining macros for inner annotation
  include/Makefile.am : reference this new file.
* syswrap-linux.c : when ENABLE_INNER, register the stacks for the outer.
   (otherwise, nothing works properly).
* m_redir.c : avoid inner interpreting the outer vgpreload instructions.
* sema.c : annotate the semaphore with RWLOCK annotations for helgrind
* ticket-lock-linux.c : similar.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12414
2012-03-03 12:01:48 +00:00
Philippe Waroquiers
6a15dd16e4 Document the new --fair-sched option.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12398
2012-02-22 20:23:29 +00:00
Philippe Waroquiers
b66672b48f * compare vgdb-error with n_errs_shown, not with n_errs_found.
Using n_errs_shown allows the user to stop on an error
  identified in a previous run by counting errors shown.
* shows also n_errs_shown in monitor command v.info n_errs_found
* slightly clarified the manual, updated to new output of v.info n_errs_found



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12388
2012-02-15 22:29:30 +00:00
Philippe Waroquiers
2d4970f494 Small doc changes:
* In core advanced manual, replace 3.7.0 by current release.
* cleanup in m_gdbserver/README_DEVELOPPERS



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12320
2011-12-27 09:03:36 +00:00
Florian Krohm
af3ca30ad2 Tweaks for the benefit of the webpage.
- mention s390x/linux in README
- formatting tweak in README.s390 so things don't look ugly in html
- add README.s390 and README.android to distribution documents


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12277
2011-11-26 04:12:01 +00:00
Philippe Waroquiers
246525e3d9 Clarify where to set TMPDIR to have working FIFOs.
+ mention --vgdb-prefix clo as an alternative.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12271
2011-11-16 20:43:39 +00:00
Julian Seward
9d39d5ad6d Some small doc updating for 3.7.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12239
2011-10-27 10:01:17 +00:00
Julian Seward
d8a36cfde4 gdbsrv: factorize gdb version handling, fix doc and typos
* fix various typos in doc
* following commit in gdb
   http://sourceware.org/ml/gdb-patches/2011-07/msg00742.html
  means unlimited length for valgrind watchpoints is understood by the
  (future) gdb 7.4 => doc updated
* factorize  gdb version detection and reporting in
  gdbserver_tests/make_local_links
* replace zignal by signal in a string used in umsg.
* updated gdbserver_tests/README_DEVELOPPERS (ref to --port vgdb option)

No functional change, tested on f12/x86, debian5/amd64, s390/RHEL4

Fixes #278892.  (Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12223
2011-10-24 07:36:57 +00:00
Julian Seward
ba88dbd353 Make vgdb.c work on Android, so that the GDB server as a whole
will work on Android.  Fixes #283600.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12204
2011-10-22 20:38:08 +00:00
Julian Seward
a07f759681 Addition of v.info scheduler monitor command
Monitor command useful for debugging/investigation of Valgrind unwinder and/or
gdbserver/gdb stack trace.

The Valgrind unwinder has some limitations compared to the GDB unwinder.
(see e.g. 278972).

With this monitor command, it is easy to see if the Valgrind unwinder
produces something different than the GDB unwinder.

Fixes #279212.  (Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12203
2011-10-22 20:23:30 +00:00
Bart Van Assche
2882ffc1e8 Update documentation now that DRD supports XML output
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12160
2011-10-14 18:06:41 +00:00
Julian Seward
7bb130f5f3 Add a new simulation hint, --sim-hints=fuse-compatible, which causes
a bunch of file-related syscalls to be handled on the might-block
syscall path rather than the fast syscall path.  This fixes deadlocks
when running some FUSE-specific filesystem codes.  Fixes #278057.
(Mike Shal, marfey@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11993
2011-08-18 15:08:20 +00:00
Tom Hughes
09b283bb40 Mention the --tool option in the manual page. Fixes #249970.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11979
2011-08-15 08:20:53 +00:00
Julian Seward
97c113e7e0 valgrind and tool mon. cmds prefixes changes + doc fixes + new vgdb option
--cmd-time-out

* changed prefixes of Valgrind core monitor commands from vg. to v.
* removed prefixes of Tool monitor commands
* memcheck leak_check 'leakpossible' arg renamed to 'possibleleak'
* memcheck make_memory 'ifaddressabledefined' arg renamed to
'Definedifaddressable'
    (with uppercase D to avoid confusion with 'defined' arg).
* vgdb options
  - Some doc updates : more logical option order documentation,
       specify 'standalone' for options aimed at standalone usage.
  - added option --cmd-time-out for standalone vgdb
     (comment of Josef Weindendorfer, needed to interface with a callgrind GUI)
* updated tests according to the above.
* updated documentation according to the above.
* some additional minor doc fixes/clarifications

(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 111.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11844
2011-06-28 08:20:39 +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
70af73cc4f Remove references to Ptrcheck in the documentation, and replace
them as relevant with references to SGcheck.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11839
2011-06-26 19:57:26 +00:00
Julian Seward
5c1e65aa42 Memcheck:
* add delta leak checking functionality
* some editing of related manual sections
(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 105.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11838
2011-06-26 12:41:33 +00:00
Julian Seward
e5bd8ec4c8 Minor documentation fixes for the GDB server. (Philippe Waroquiers,
philippe.waroquiers@skynet.be).  Bug 214909 comment 106.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11834
2011-06-25 10:05:28 +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
48d69a241a Move the GDBserver documentation from the "Valgrind core" chapter
to the "Valgrind core: advanced topics" chapter.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11821
2011-06-17 08:31:22 +00:00
Julian Seward
97024bcccb Edits for the GDBserver documentation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11820
2011-06-17 08:14:00 +00:00
Julian Seward
da49be7c14 Add a fourth --smc-check= variant, --smc-check=all-non-file. This
adds self-modifying-code checks to all guest code taken from mappings
which are not file backed, but omits checks in code from file backed
mappings.  This has the effect of giving complete smc-coverage of JIT
generated code -- since that is invariably generated into anonymous
mapped areas -- without burdening non-JIT generated code with such
checks.  Running Firefox 6, --smc-check=all-non-file reduces by a
factor of between 3 and 10 the number of translations requiring a self
check, compared to --smc-check=all.  These changes depend on the vex
interface changes in r2158.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11798
2011-06-07 21:39:28 +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
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
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
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
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
Nicholas Nethercote
71e0b2a3f8 Clarify some details about "possibly lost" heap blocks.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11491
2011-01-04 23:46:07 +00:00
Julian Seward
906915e79b New command line option: --trace-children-skip-by-arg, which allows
chase/nochase decisions for child processes to be made on the basis
of their argv[] entries rather than on the name of their executables.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11483
2010-12-06 11:40:04 +00:00
Julian Seward
ee58d770ca Finalise doc stuff for 3.6.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11462
2010-10-20 17:07:01 +00:00