1116 Commits

Author SHA1 Message Date
Dirk Mueller
8d8ec2ca64 implement IN and OUT opcodes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1839
2003-09-27 20:15:01 +00:00
Nicholas Nethercote
ff5d331a0a Remove extraneous tabs from Memcheck --trace-codegen output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1838
2003-09-27 19:54:04 +00:00
Nicholas Nethercote
f8762eb55d Remove two pieces of identical code used by Memcheck and Addrcheck, and put
them in a shared place.  (They used to be different, when Addrcheck didn't
distinguish between reads and writes, but now they're the same.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1837
2003-09-26 14:55:31 +00:00
Nicholas Nethercote
21175aa99b Add support for "movl imm32, %esp". Needed for 'grinding vg_startup.S :)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1836
2003-09-26 09:11:51 +00:00
Nicholas Nethercote
6436799e7d Fix a couple of bugs in the sigalstack wrapper (Nb: found when I was
(apparently) self-hosting :)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1835
2003-09-26 09:06:41 +00:00
Dirk Mueller
eaf2fd38cd implement a couple more instructions. I've mailed this patch to Julian
and Nick but got no reply. I guess they're okay with it. I tested them
quite a lot so it should be fine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1834
2003-09-26 00:32:53 +00:00
Dirk Mueller
3545e98607 be more specific which allocation failed
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1833
2003-09-26 00:26:07 +00:00
Dirk Mueller
5591d2e2d8 implement all SSE(2) ucodes. now I can run mplayer in valgrind :)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1832
2003-09-26 00:16:25 +00:00
Nicholas Nethercote
01e3345f23 At startup, now tests if program is statically linked. Bails with a useful
message if so.  If anyone thinks this will break anything, please yell.

Updated FAQ #5 correspondingly, added info on how to combine static and dynamic
libraries.

MERGE TO STABLE(?)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1831
2003-09-25 18:20:17 +00:00
Nicholas Nethercote
ce82c07580 Cleaned up reading of debug info a bit.
Renamed:
  VG_(read_procselfmaps_contents)() --> VG_(read_procselfmaps)()
  VG_(read_procselfmaps)()          --> VG_(parse_procselfmaps)()
  VG_(read_symbols)()               --> VG_(read_all_symbols)()
  VG_(read_symtab_callback)()       --> VG_(read_seg_symbols)()

Removed the Bool 'read_from_file' arg from (what is now)
VG_(parse_procselfmaps)().  If /proc/self/maps needs to be read beforehand, the
code calls (what is now) VG_(read_procselfmaps)() before.  Still using the
static buffer which is not nice but good enough.

More importantly, I split up VG_(new_exe_segment)() into
VG_(new_exeseg_startup)() and VG_(new_exeseg_mmap)().  This is because at
startup, we were stupidly calling VG_(read_symbols)() for every exe seg, which
parses /proc/self/maps completely in order to load the debug info/symbols for
the exe seg (and any others we haven't already got the symbols for).  Despite
the fact that the startup code reads /proc/self/maps to know which segments are
there at startup.  In other words, we were reading /proc/self/maps several
times more often than necessary, and there were nested reads, which Stephan
Kulow's recent depth patch fixed (but in a pretty hacky way;  this commit fixes
it properly).  So VG_(new_exeseg_startup)() now doesn't cause /proc/self/maps
to be re-read.  Unfortunately we do have to re-read /proc/self/maps for mmap(),
because we don't know the filename from the mmap() call (only the file
descriptor, which isn't enough).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1830
2003-09-25 17:54:11 +00:00
Dirk Mueller
60f7936600 typo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1829
2003-09-23 19:07:16 +00:00
Nicholas Nethercote
d9309149c8 Addrcheck was broken, because it wasn't recognising "Overlap" suppressions.
Fixed now.

MERGE TO STABLE (assuming that Addrcheck does overlap checking in STABLE, which
I think it does)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1828
2003-09-19 08:10:07 +00:00
Nicholas Nethercote
3534c8fc08 Using start_eip instead of eip for disassembly failure messages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1827
2003-09-18 08:37:20 +00:00
Dirk Mueller
a1e28f774d add suppression about common X11 protocol and ICE errors. Please
scream if you don't like this.. Personally I've never seen a valid
warning and all of them were spurious.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1826
2003-09-18 01:49:30 +00:00
Dirk Mueller
0f45de2a6d remove default.supp during clean
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1825
2003-09-18 01:42:24 +00:00
Dirk Mueller
7d1abc6b9e compiler warning fixes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1824
2003-09-18 01:41:48 +00:00
Dirk Mueller
612b8daeac fix compiler warnings
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1823
2003-09-18 01:39:50 +00:00
Dirk Mueller
34af4d4549 fix compiler warning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1822
2003-09-18 01:15:32 +00:00
Julian Seward
f08f0f0ca3 Suppress a couple more messages when -q applies.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1821
2003-09-17 21:48:26 +00:00
Julian Seward
76b167b551 Add patch from Stephan Kulow to solve the following:
read_procselfmaps calls *record_mapping which
   is startup_segment_callback for init_memory. But this
   again calls through read_symbols read_procselfmaps
   again with read_from_file == True. But this overwrites
   the internal buffer and causes parsing errors.
   (What makes the error a bit funny is that valgrind
    wouldn't have catched that error afaik :)
   Anyway: our solution is to forbid read_from_file from
   with callbacks

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1820
2003-09-17 07:39:28 +00:00
Nicholas Nethercote
c0f0059bf7 Added some skin-visible functions that give skins a bit more control over
how stack snapshots are taken and printed;  they can be used in preference
to VG_(get_ExeContext)() and VG_(pp_ExeContext)().  These are used by
Massif, my heap profiling skin.

Changed --num-callers to allow a backtrace size of 1.

Added code so that when Valgrind fails to disassemble an instruction, the
instructions line/file and address are printed out, which makes it easier to
work out where and what it is.  Required the stack snapshot changes above.

MERGE TO STABLE?


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1819
2003-09-16 07:41:43 +00:00
Nicholas Nethercote
977e0eb56f Made the realpath overlap ones apply for Addrcheck too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1818
2003-09-15 07:19:19 +00:00
Nicholas Nethercote
0c7c912c5b Fix problem with adjtimex.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1817
2003-09-09 11:27:59 +00:00
Nicholas Nethercote
1cfe4c9b5b With -v option, client program's argv[] now printed at startup. Should be
useful when trying to interpret users' problems.  Each argv is printed on a
separate line, to make it extra clear where each one starts and ends.

MERGE TO STABLE (PLEASE!)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1816
2003-09-09 07:26:21 +00:00
Nicholas Nethercote
0db1843d96 Made Addrcheck distinguish between invalid reads and invalid writes (previously
was just saying "invalid memory access").

Added a regression test for this, for memcheck and addrcheck.  Also made
Addrcheck use Memcheck's fprw regtest.  Was able to remove the not-very-useful
'true' test for Addrcheck now that it has a couple of real tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1815
2003-09-05 23:29:33 +00:00
Nicholas Nethercote
aae64e3630 Forgot to add these files for the writev regression test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1814
2003-09-05 23:02:38 +00:00
Dirk Mueller
be5cd9c8c1 patch for adjtimex syscall by Bob Van Manen <BVanManen@Scene7.com>
appares to compile for me


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1813
2003-09-05 17:46:54 +00:00
Nicholas Nethercote
138ada5bc2 Fixed readv() and writev() so they won't fall over if they are given a negative
count.  Added a regression test for it.

Updated the basic test stderr filter to strip out line numbers from
vg_intercept.c

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1812
2003-09-04 21:57:45 +00:00
Nicholas Nethercote
65461f0427 Trivial assertion fix -- the SSE3 instructions can be of size 8.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1811
2003-09-04 21:12:22 +00:00
Nicholas Nethercote
7b2a49544e Fixed brk(); it was almost completely broken.
Added a regression test for it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1810
2003-09-04 20:57:51 +00:00
Nicholas Nethercote
f1bde14402 Fixed overlap errors so the hacky strdup'ing of strings isn't necessary;
now passing in the relevant parameters via an 'extra' struct, as is proper.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1809
2003-09-04 20:50:47 +00:00
Nicholas Nethercote
e1d0585265 docs typo
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1808
2003-08-29 11:42:50 +00:00
Nicholas Nethercote
f6e8535d25 Minor fix: errors on MMX_MemRd instructions were erroneously being called
writes.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1807
2003-08-28 17:46:16 +00:00
Dirk Mueller
4d7ce5006f implement waitpid syscall. Patch by Benjamin Lee <benjaminlee@users.sf.net>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1806
2003-08-26 17:36:26 +00:00
Nicholas Nethercote
9b074f685f Teach Cachegrind about SSE instructions, courtesy of Josef Weidendorfer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1805
2003-08-25 16:15:40 +00:00
Nicholas Nethercote
f563f81443 Added #17 about how to write suppressions.
MERGE TO STABLE (along with several other FAQ changes I've made recently but
forgot to write this note on)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1804
2003-08-20 11:19:17 +00:00
Nicholas Nethercote
29c92969ff Fix up the way SK_(update_extra)() is called.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1803
2003-08-19 16:14:42 +00:00
Nicholas Nethercote
f55a533a47 Comment-only change
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1802
2003-08-19 12:16:05 +00:00
Nicholas Nethercote
946e95a5b6 Fix inaccuracies in #12.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1801
2003-08-19 07:50:24 +00:00
Nicholas Nethercote
1738927994 Added FAQ #16, about that assertion failure in 'make' when building.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1800
2003-08-15 07:35:20 +00:00
Nicholas Nethercote
d4192ee3b2 comments change only
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1799
2003-08-14 15:23:55 +00:00
Nicholas Nethercote
483211c96d Another update to #12.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1798
2003-08-13 09:56:30 +00:00
Nicholas Nethercote
f824df47c3 Clarified FAQ #14.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1797
2003-08-13 08:34:42 +00:00
Dirk Mueller
ba418da664 its linux 2.6.x these days
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1796
2003-08-10 13:37:01 +00:00
Nicholas Nethercote
37f6cc0c0d Added FAQ 15, about writing to read-only memory.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1795
2003-08-07 21:24:24 +00:00
Julian Seward
568fcc200b Add memcmp() to our collection of functions we do ourselves.
I don't trust the glibc not to be optimised-to-hell-and-beyond.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1794
2003-07-30 21:24:25 +00:00
Julian Seward
d9bc0c3167 more wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1792
2003-07-27 08:04:48 +00:00
Julian Seward
f35b729f82 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1791
2003-07-26 21:39:05 +00:00
Julian Seward
99ab046fe6 --> 20030725
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1790
2003-07-26 17:50:42 +00:00
Julian Seward
439cee2a05 Increase VG_N_FORKHANDLERSTACK from 2 to 4. For reasons known only to
itself, pth_atfork1 and 2 fail on R H 7.3 for a size-2 stack, but only
with certain skins.  Don't ask me.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1789
2003-07-26 17:49:58 +00:00