257 Commits

Author SHA1 Message Date
Bart Van Assche
72cd30c206 XML output: escape XML-metacharacters in executable path and arguments. This is a modified version of the patch submitted by Evgeniy Stepanov <eugeni.stepanov@gmail.com>. See also #284621.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12188
2011-10-22 08:24:32 +00:00
Bart Van Assche
337b3b5525 Emit <state>RUNNING</state> earlier
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12136
2011-10-11 18:50:14 +00:00
Bart Van Assche
99066365d5 Add format specifier %ps: only escape XML-metacharacters for --xml=yes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12135
2011-10-11 18:49:35 +00:00
Bart Van Assche
71a513f01a Format functions: change format specifier %t into %pS. Remove the _no_f_c formatting function variants.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12108
2011-10-06 19:08:37 +00:00
Florian Krohm
ab466bd7b7 Fix a regression (none/tests/cmdline[12]) which was introduced
by r12063. 
VG_(clo_vgdb_prefix) was used before it was initialized.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12064
2011-09-29 14:26:38 +00:00
Florian Krohm
47c681afb8 Remove hardwired /tmp directory in vgdb. Honour VG_TMPDIR
and TMPDIR which was introduced when fixing bugzilla #267020.
Factor out VG_(tmpdir). New function VG_(vgdb_path_prefix).
Partially fixes bugzilla #280757. 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12063
2011-09-29 03:03:45 +00:00
Julian Seward
325dd5e5fe Fix link error for 32-bit build on OSX 10.7 (Lion). This is the
failure referred to in #275168 comment 0.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12000
2011-08-23 07:35:42 +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
Florian Krohm
5e08a97bfe Make the location for temporary files configurable at runtime.
To that effect observe the environment variable TMPDIR. If defined,
its value takes precedence over VG_TMPDIR.
Because the directory name is no longer a compile time constant,
VG_(err_config_error) was changed to take a variable argument list.
Fixes #267020.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11892
2011-07-12 19:07:05 +00:00
Julian Seward
3d0958fc38 Allow selection of an alternative location for temporary files at
configure time, via the --with-tmpdir flag.  The configure.in part of
this was mistakenly committed already in r11872 as first hunk of the
configure.in change.  Bug 266035 comment 11.  (Kenny Root,
kroot@google.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11881
2011-07-12 06:58:55 +00:00
Julian Seward
e6f3302aeb Make the wait-for-gdb delay loop somewhat more modern-compiler-proof.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11855
2011-07-05 09:13:41 +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
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
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
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
Julian Seward
555e3b2ccb 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
2011-05-03 14:24:11 +00:00
Julian Seward
b3827d6c33 Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis.  Does not change any
functionality.  Related to #259977.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11687
2011-04-11 16:17:51 +00:00
Julian Seward
9c6d0dc9c9 Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



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



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
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
b43eec1219 Documentation update for 3.6.0 (not including NEWS).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11440
2010-10-13 21:47:29 +00:00
Julian Seward
1375448f10 Make the --prefix-to-strip=... command-line option added in r11312
behave more like the original proposal in #245535.  This makes it
more flexible and general.  Also rename it.

* new name is --fullpath-after=

* allow multiple instances of --fullpath-after=

* don't require the specified strings to be prefixes, only substrings

But retain the elegant backwards-compatibility trick in Bart's r11312
commit: if --fullpath-after= is not specified at all, then behave
exactly as before.

Fixes #245535.  A mixture of patches from Bart Van Assche
(bart.vanassche@gmail.com), Alexander Potapenko (glider@google.com),
and me (integration and documentation).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11430
2010-10-12 00:44:05 +00:00
Bart Van Assche
8504416a46 Consistency improvement: made sure that VG_TRACK(die_mem_stack, address, len)
is not invoked with a zero third argument.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11342
2010-09-07 16:32:53 +00:00
Bart Van Assche
35eece7dd5 Added command-line option --prefix-to-strip=... Closes #245535.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11312
2010-08-31 15:18:32 +00:00
Julian Seward
7a7956ac81 Merge from branches/THUMB: link-time stub needed on Ubuntu 10.04 (ARM)
(maybe.  actually I am not sure why this is necessary).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11284
2010-08-22 12:23:01 +00:00
Julian Seward
d5436418b9 In XML mode, properly escape test strings in the preamble.
Fixes #244923.  (Zhujunling@huawei.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11227
2010-07-23 17:03:22 +00:00
Nicholas Nethercote
f801f7b5d7 Make -h -h be equivalent to --help-debug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11211
2010-07-06 04:25:12 +00:00
Nicholas Nethercote
11f94ef626 Make error messages at start-up more consistent. Every line of such
messages now begin with "valgrind: ", and they're more often printed before
the preamble.  This required introducing a new message kind, Vg_FailMsg, and
functions VG_(fmsg) and VG_(fmsg_bad_option), and removing
VG_(err_bad_option).

Where we used to have horrible output like this:

    [ocean:~/grind/ws2] vg5 --tool=massif --threshold=101 date
    ==31877== Massif, a heap profiler
    ==31877== Copyright (C) 2003-2010, and GNU GPL'd, by Nicholas Nethercote
    ==31877== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright info
    ==31877== Command: date
    ==31877== 
    ==31877== --threshold must be between 0.0 and 100.0
    valgrind: Bad option '--threshold'; aborting.
    valgrind: Use --help for more information.

We now have nice output like this:

    [ocean:~/grind/ws2] vg2 --tool=massif --threshold=101 date
    valgrind: Bad option: --threshold=101
    valgrind: --threshold must be between 0.0 and 100.0
    valgrind: Use --help for more information or consult the user manual.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11209
2010-07-06 04:05:23 +00:00
Julian Seward
77f742ee15 Give prototypes for the 64-bit integer division replacements, so
gcc doesn't complain about the lack thereof.  (x86-darwin only).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11206
2010-07-01 14:50:30 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00
Bart Van Assche
45037a25dc Fixed compiler warnings about casting from const char * to char *.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11176
2010-06-14 18:12:56 +00:00
Bart Van Assche
8ac697bb57 Made the abort() function available on PPC too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11172
2010-06-13 13:46:24 +00:00
Julian Seward
2e6b7655d1 New flag --require-text-symbol=:sopatt:fnpatt, to be used to check
that specified shared objects contain specified symbols.  Along with a
couple of regtests that unfortunately will fail on MacOSX.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11125
2010-05-09 22:30:43 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Bart Van Assche
53596eaf4a The help text printed by command-line option -h does now show the default
value for option --read-var-info. Fixes bug #231458.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11097
2010-03-27 07:38:39 +00:00
Julian Seward
977b0eaeaa 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
2010-01-15 10:57:57 +00:00
Julian Seward
e9de458500 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
2010-01-01 11:59:33 +00:00
Julian Seward
426c137045 New flag: --trace-children-skip=patt1,patt2,etc
Specifies a comma-separated list of executable-names
(with "*" and "?" wildcards allowed) that should not be traced into
even when --trace-children=yes.  Modified version of a patch
from Bill Hoffman.  Fixes #148932.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10927
2009-11-05 08:55:13 +00:00
Bart Van Assche
82e0033fdd Switched back from dynamic detection of whether the proc filesystem
is mounted to compile-time logic in order to minimize the differences
in behavior with Valgrind version 3.5.0.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10868
2009-08-25 20:15:41 +00:00
Bart Van Assche
772166c146 Renamed the function VG_(have_proc_filesystem)() into
VG_(is_procfs_mounted)(). The old name was derived from the name
of the preprocessor macro HAVE_PROC while the new name is a more
accurate description of what this function does.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10867
2009-08-25 17:34:58 +00:00
Bart Van Assche
6b9dcdcd97 The configure-time test whether the proc filesystem is mounted (introduced
in r10156) broke cross-compilation. This patch converts the configure-time
test into a runtime test. Should fix bug #204843.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10860
2009-08-23 09:53:27 +00:00
Julian Seward
4b9ddd9604 Fix a couple of errors in the revised XML generation that were
spotted by Ashley Pittman:

* If I specify --xml-file=<file> but not --xml=yes I get partial
  output in the xml file.

* Using log file qualifiers with XML results in the xml for the
  qualifier being put to stdout.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10823
2009-08-15 23:05:34 +00:00
Nicholas Nethercote
829fbc977d Output tweaks:
- Always print a blank line after significant messages (eg. errors).  This
  makes the handling of blank lines much simpler.

- Don't print full stops at the end of messages.  We mostly don't do it, so
  I got rid of all the remaining ones I could find for consistency.

- Use --leak-check=full rather than --leak-check=yes, for consistency with
  docs and other messages.

- Update partiallydefinedeq.stderr.exp2 for older changes.

This commit only updates the code.  Test updates will follow shortly.  (I'm
separating them so the code changes aren't swamped by the test changes in
the SVN logs.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10783
2009-08-12 00:14:16 +00:00
Nicholas Nethercote
4e495edf4a Make "option" terminology consistent some more. Also tweaked the mempool
Memcheck section a little.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10759
2009-08-10 01:29:14 +00:00
Julian Seward
8ffe2fdefa Tidy up of messaging:
* For all tools and the core, don't show statistics when -v is in
  effect.  Instead, try to restrict -v to mostly user-useful
  stuff.

* A new flag --stats=no|yes [no] produces statistics output instead.

* Fix longstanding problem in that Memcheck's leak checker ran after
  the core's error manager module shut down, thereby not showing use
  counts of leak suppressions.  This fixes #186790.

* As a consequence, the leak checker text output of Memcheck has
  changed a bit -- leak check is done before the final error
  summary is done (much more logical), and the output has been
  tidied up a bit.

* Helgrind, Drd and Ptrcheck now also print "For counts of
  detected and suppressed errors, rerun with: -v", which makes
  them consistent with Memcheck in this regard.  These are
  filtered out by the regtest filter scripts.

For all tools except Memcheck, the regtests are unchanged.  On
Memcheck regtests still fail due to rearrangements of the leak
checker output.  This will be fixed by a followup commit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10746
2009-08-07 15:46:56 +00:00
Nicholas Nethercote
8026c4766f Various option-related tweaks:
- Match the ordering of the non-tool-specific options in the usage message
  with the order in the user manual.  As a result, we now always print
  --alignment and --trace-malloc in the core's usage messages, which saves
  malloc-replacing tools from doing it themselves (and brings it in line
  with options that only apply to error-collecting tools).

- Improved the presentation of the Vex options with --help-debug.

- Removed documentation of -d in the manual because it's a debugging-only flag.

- Documented --read-var-info in the manual.  This fixes bug 201169.

- Renamed --auto-run-dsymutil as --dsymutil and documented it in the usage
  message.

- Fixed an XML error in manual-core-adv.xml.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10703
2009-08-04 02:32:55 +00:00
Nicholas Nethercote
9c4252c6a1 Don't wrap the "Command:" line, as doing so makes cutting-and-pasting the
command difficult.  Also, when wrapping I was failing to factor in the
escape chars needed for chars like ' ';  now I don't need to.  And this
means the 'long-command' test is no longer necessary.  In other words,
favour utility and simplicity over aesthetics.

Also, the "Command:" line wasn't being wrapped in <line></line> in XML
output.  It now is.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10699
2009-08-04 00:27:56 +00:00
Nicholas Nethercote
c20ba72234 In the "Command:" line in the preamble, escape special chars such as ' ' and
'\\'.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10690
2009-08-02 23:03:06 +00:00
Nicholas Nethercote
80e2524997 Don't bother printing "My PID" when logging to a file or socket, as that
value is shown at the start of every output line.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10669
2009-07-30 23:36:43 +00:00
Nicholas Nethercote
c2f21c39be Now that we always print the command, no need to reprint it when logging to
file or a socket.  And tweak how the PIDs are printed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10668
2009-07-30 23:35:11 +00:00