817 Commits

Author SHA1 Message Date
Nicholas Nethercote
3ddb89814c Backing out bogus support for gettid() I added yesterday.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2081
2003-12-02 09:35:33 +00:00
Nicholas Nethercote
c0e09ae11c Add gettid() syscall.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2078
2003-12-01 14:00:11 +00:00
Nicholas Nethercote
5f1bf8818f Fixed test in section finding code that was broken for .plt and .got sections.
Thanks to Tom Hughes for the patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2075
2003-12-01 11:54:09 +00:00
Nicholas Nethercote
4b71b93e45 Factor out repeated code for LOOP{E,NE}
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2072
2003-11-28 09:44:21 +00:00
Dirk Mueller
466ada9056 fix alignment checking of __posix_memalign. merging to stable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2069
2003-11-28 00:15:57 +00:00
Nicholas Nethercote
5d8ce040fe Fixed up REP-prefix handling majorly. Factored out *lots* of repetitive code,
so much so that the file is now 280 lines shorter.  This despite me also adding
support for LOOP{E,NE} (thanks to Abhijit Menon-Sen).  Also added support for
CMPS[lw], which was missing.  Adding more REP-prefix instructions in the future
will now be much easier.

As part of this, I moved the D-flag fetch outside of the REP loops.  This might
make programs that use REP prefixes a lot go faster.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2068
2003-11-27 16:15:17 +00:00
Dirk Mueller
6b60f29b51 remove reference to --assume-2.4 option
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2066
2003-11-27 11:43:53 +00:00
Nicholas Nethercote
3bbbbfc461 Fix comment
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2065
2003-11-27 09:30:28 +00:00
Dirk Mueller
ef4bb579c5 reverting last commit, which broke all of valgrind.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2063
2003-11-27 09:07:47 +00:00
Jeremy Fitzhardinge
303f8a8df6 Fix up the have_settid test so it works on both plain 2.4 and 2.6 kernels.
I think this will also work on SuSE kernels.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2062
2003-11-27 08:11:10 +00:00
Dirk Mueller
f0b609cf65 test for PARENT_SETTID support in clone() of the kernel instead
of testing for presence of NPTL by assuming that sys_futex is only
implemented when its a NPTL patched kernel.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2061
2003-11-27 02:16:41 +00:00
Dirk Mueller
23d88489ff add prefetch(w) support - the 3dnow! version of it. doesn't hurt
supporting and its very easy.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2056
2003-11-20 20:45:51 +00:00
Nicholas Nethercote
d6d804d382 Updated all "report bugs to..." messages to point to valgrind.kde.org; also
updated the docs to refer to valgrind.kde.org instead of the old website.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2055
2003-11-20 16:20:55 +00:00
Nicholas Nethercote
b6e961b0bf Improved vg_libpthread's IGNORED/KLUDGED error messages; lots of people found
"kludged" confusing.  Even printing out brief explanations of why functions are
ignored/kludged, in some cases.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2054
2003-11-20 14:23:09 +00:00
Nicholas Nethercote
2b3c517173 Printing usage message to stdout instead of stderr, which seems to be the
standard thing to do.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2053
2003-11-20 10:38:07 +00:00
Dirk Mueller
2c314c8a97 this should fix compilation on weird kernel 2.6.x installations.
CCMAIL: 68360@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2052
2003-11-19 22:07:14 +00:00
Dirk Mueller
c1f0959dfe make it compile on non-C90 compilers. Thanks for the patch.
CCMAIL: 68525-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2051
2003-11-19 22:05:35 +00:00
Dirk Mueller
99bec54aa3 SHUFPD support
MERGE TO STABLE
CCMAIL: 68588-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2050
2003-11-19 22:02:08 +00:00
Dirk Mueller
84dac350b5 add CVTPD2PS support, based on patch by Josef Weidendorfer
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2044
2003-11-19 17:00:58 +00:00
Dirk Mueller
f633fb1794 trying to fix compilation. Does it work now for everybody?
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2043
2003-11-19 16:54:52 +00:00
Dirk Mueller
69fa3515ae make use of statfs64 and make code blocks adjacent
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2042
2003-11-19 08:56:44 +00:00
Dirk Mueller
abbe971b7c be less verbose by default
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2036
2003-11-19 00:47:00 +00:00
Dirk Mueller
df211b883c raise sanity limit to pass coreutils testsuite
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2035
2003-11-19 00:45:13 +00:00
Dirk Mueller
c3d9874e22 implement statfs64, utimes and clock_gettime
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2034
2003-11-19 00:43:57 +00:00
Jeremy Fitzhardinge
580110cd33 Add some missing braces.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2032
2003-11-18 16:55:33 +00:00
Robert Walsh
f9ea43d896 Add a facility for tracking open file descriptors. Information about
still open files is dumped out exit.  Enabled using the --track-fds
switch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2031
2003-11-17 17:45:00 +00:00
Nicholas Nethercote
d38eac1bf6 Made the warning clearer when you try to catch SIGKILL/SIGSTOP. Also made it
clearer what's wrong if you try to catch signals 32 and 33;  they're not bad
signals, just used internally.  Updated one regtest accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2030
2003-11-17 10:37:19 +00:00
Nicholas Nethercote
354e75a208 Support posix_memalign properly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2028
2003-11-15 19:24:08 +00:00
Nicholas Nethercote
fb2d543ee8 Started to rescind the name "skin", replacing it with "tool". Did this in all
the places that normal users will see:

  - command line: --tool=foo (although --skin=foo still works)
  - docs: removed all traces (included renaming coregrind_skins.html to
    coregrind_tools.html)
  - in the usage messages
  - in error messages

Also did in in some places that I judged were unlikely to cause clashes with
existing workspaces:

  - in the header comments of many files (eg. "This file is part of Memcheck, a
    Valgrind tool for...")
  - in the regtests script
  - in the .supp files
  - in AUTHORS
  - in README_MISSING_SYSCALL_OR_IOCTL

Also update the AUTHORS file to mention Jeremy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2027
2003-11-14 17:47:54 +00:00
Nicholas Nethercote
c4d186f121 Removed no-longer-needed declarations of __SOME_SKIN_H.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2025
2003-11-13 23:02:16 +00:00
Nicholas Nethercote
d1642f0ed8 Greatly improved the symbol table reading code. It was a kludgy, accreted
mess.  Pulled the symbol table reading bit out of vg_read_lib_symbols() into
read_symtab(), in the process removing the awful twice-only loop used to read
the symbol table and the dynamic symbol table.  Factored out the code used to
find sections of interest (eg. .strtab, .symtab, .stabs, .plt, etc), replacing
nine (yes, nine) individual and slightly differing searches.

It's now much easier to understand, 132 lines shorter, and provides a better
base for easily doing more complicated debug stuff, eg. when we start reading
in all the debugging info (such as .debug_info for dwarf2).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2024
2003-11-13 22:34:00 +00:00
Nicholas Nethercote
4126f4b26e Remove local shellshort function, use the standard VG_(ssort).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2023
2003-11-13 21:50:45 +00:00
Nicholas Nethercote
e9a3bff869 Changed error messages: subsidiary explanations within an error message are now
indented one space;  previously it was mixed, but Memcheck/Addrcheck indented
"Address" lines 3, which made them hard to see in the stack trace.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2021
2003-11-13 17:53:43 +00:00
Nicholas Nethercote
d7bfd760a8 Changed error messages: now don't print anything below main() unless the new
option --show-below-main is on.  It's on by default.  It also affects
suppressions generated with --gen-suppressions=yes.  Updated reg tests
accordingly.

Also updated docs for this.  And added some missing command-line args to docs.
Also compartmentalised the options a little in the docs, and rearranged the
order of options in the usage message, in anticipation of a bigger
rearrangement that will be necessary soon -- to distinguish options used by all
skins from those used by error-checking skins, to skin-specific ones.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2020
2003-11-13 17:35:04 +00:00
Nicholas Nethercote
5de6ace29c Be quieter.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2019
2003-11-13 16:49:22 +00:00
Jeremy Fitzhardinge
f15fa06f97 Fix some (bone-headed) loose ends left by my last checkin. "make regtest"
actually works this time.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2018
2003-11-10 21:21:00 +00:00
Nicholas Nethercote
8166b6f985 Don't print this debug msg if -q is on.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2017
2003-11-10 13:26:49 +00:00
Jeremy Fitzhardinge
64b0808872 Only set the thread's status to WaitSys if we're actually waiting for
a proxyLWP to complete a syscall.

Update sigaltstack test to use mmap to allocate the stack.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2016
2003-11-09 09:51:33 +00:00
Jeremy Fitzhardinge
4eac75bf3e Fix some bugs in syscall/signal handling:
If the proxyLWP for a thread got a signal just as we were sending the
syscall request to it, then we would end up running the syscall twice.
The fix is to not check the results pipe while sending the syscall request
- wait until we're in a better state for handling signals (the deadlock
the results-read was supposed to avoid cannot actually happen).

Related to that, if we're delivering a signal to a thread, and that thread
is currently waiting for a syscall to complete, make sure we collect the
syscall results before entering the signal handler (otherwise we may end
up bogusly trying to restart the syscall by moving EIP back, even though
it now points to the signal handler rather than the syscall instruction)

This change also adds an assertion to VG_(restart_syscall) to make sure
we were actually restarting a syscall and not just randomly changing EIP
(this found the problem above).

Also, make set/getitimer run in the proxyLWP context, so that they
modify/read the proxyLWP's timers rather than the schedluer LWP's timers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2013
2003-11-07 23:09:48 +00:00
Helio Chissini de Castro
d99d4203ee - Fix for kernel 2.6. __user need definition.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2001
2003-11-04 12:53:59 +00:00
Helio Chissini de Castro
5181412cab - Fix for kernel 2.6. __user need definition.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1999
2003-11-04 12:33:29 +00:00
Julian Seward
5a67bdae1f If we bomb out due to not finding the executable, print our invokation
name.  Before:

   'ssss' not found in $PATH, aborting.

After:

   ./Inst/bin/valgrind: 'ssss' not found in $PATH, aborting.

(Already in STABLE).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1994
2003-11-04 07:12:06 +00:00
Nicholas Nethercote
450e4bc293 Move var declarations to start of block, for older versions of gcc.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1985
2003-11-03 11:12:02 +00:00
Nicholas Nethercote
9c8cc2ba2b Implemented PUSH/POP %{FS,GS}, and PUSH %CS (Nb: there is no POP %CS). Based
on patches from Adam Gundy and Tom Hughes.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1982
2003-11-02 17:00:23 +00:00
Nicholas Nethercote
91686661b2 Make the startup static and suid checks follow symlinks.
Also a couple of minor formatting changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1979
2003-11-01 14:49:58 +00:00
Nicholas Nethercote
ddc388cfd7 Add missing printf and pre_mem_read to rt_sigtimedwait(), thanks to Thomas
Lussnig <lussnig@smcc.net>.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1978
2003-11-01 14:03:37 +00:00
Dirk Mueller
a38191f22b fix 'make dist'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1977
2003-11-01 01:59:23 +00:00
Jeremy Fitzhardinge
541f9f86f8 Fix --trace-malloc=yes, by using client-side VALGRIND_INTERNAL_PRINTF
to print the allocation traces rather than trying to directly use
VG_(printf).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1975
2003-10-31 07:13:41 +00:00
Jeremy Fitzhardinge
65649c9d47 Patch from Robert Walsh <rjwalsh@durables.org>. Adds some new client
requests to allow client code to print messages through Valgrind's
logging mechanism.  The new requests are:
  VALGRIND_PRINTF - do a normal printf (prefixed with **PID**)
  VALGRIND_PRINTF_BACKTRACE - do a printf with stack trace
  VALGRIND_INTERNAL_PRINTF - printf, but for internal use (prefixed with ==PID==)
  VALGRIND_INTERNAL_PRINTF_BACKTRACE - as above, with backtrace


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1974
2003-10-31 07:12:21 +00:00
Dirk Mueller
a32b99ae1f there have been reports that "stat" is not portable enough.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1972
2003-10-30 13:49:36 +00:00