526 Commits

Author SHA1 Message Date
Nicholas Nethercote
8bffd600d5 Qualifying suppression types with the skin name, like this:
memcheck:Addr4

Changed the `name' need of the memcheck skin from "valgrind" to "memcheck" for
this.  But the name Valgrind will return when I print core and skin names in
the startup message.

One issue is that some skins share suppression types, eg. memcheck and
addrcheck.  Might be useful to allow multi-skin suppressions, viz:

  memcheck,addrcheck:Addr4

This won't be too hard to tack on, though.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1163
2002-10-02 11:02:27 +00:00
Nicholas Nethercote
06a95f2392 Added seg_override test. Note this test fails on the 1.0.X branch (if you use
the --stable option to the regression test script).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1162
2002-10-02 10:36:46 +00:00
Julian Seward
83cb487dd0 From "Francis Lebourse" <flebourse@jetmultimedia.fr>:
[re the ELF symbol reader]

This patch tries to exploit the dynamic symbols of a library if the
standard and debug symbols are missing.

This way, I avoid the "object doesn't have a symbol table message"
message and valgrind is able to print meaningful backtraces (else you
have only "in libsomelib.so"), even in the case of stripped libs.

Since the check of the .dynsym/.dynstr sections is done before the
.symtab/.strtab sections, the previous behavior is preseved for
unstripped libraries.

MERGE TO STABLE (if it doesn't cause probs with suppression files)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1161
2002-10-02 10:20:30 +00:00
Julian Seward
dcb3d7e32c update the libc_tsd stuff for R H limbo (glibc HEAD actually) and
clean it up a bit


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1160
2002-10-02 09:41:49 +00:00
Julian Seward
a8bd11ee33 Minor mods
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1159
2002-10-02 09:11:34 +00:00
Nicholas Nethercote
0e37693352 Ahem, reverse comparison so that normal stack traces have more than one entry
and 75% of regression tests don't fail.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1158
2002-10-02 07:56:02 +00:00
Julian Seward
d4d384d7ba Improve stack-switch-handling logic following discussion with John Regehr.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1157
2002-10-02 01:38:40 +00:00
Nicholas Nethercote
86f876238e Update and add .cvsignore files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1156
2002-10-01 11:50:39 +00:00
Nicholas Nethercote
124f1cd350 Moved `resolv' into the test-suite-proper.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1155
2002-10-01 11:45:34 +00:00
Julian Seward
b362551b31 VG_(handle_esp_assignment): reinstate kludge for detecting and
handling user-space stack switching.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1154
2002-10-01 09:09:23 +00:00
Julian Seward
925baa1d00 If the stack is ridiculously big, don't poke around ... but don't bomb
out either.  Needed to make John Regehr's user-space threads package
work.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1153
2002-10-01 09:02:47 +00:00
Julian Seward
3b3789b8f7 addStr: don't segfault if si->strtab == NULL.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1152
2002-10-01 08:59:36 +00:00
Julian Seward
6f356bc8db This glibc (2.2.90 ?) seems to need another thread-specific key.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1151
2002-10-01 02:09:39 +00:00
Julian Seward
ba23994713 Namespace police.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1150
2002-10-01 00:50:47 +00:00
Julian Seward
469c9e167b Placate gcc-3.2, which rather alarmingly complains that ...
vg_libpthread.c:1550: warning: weak declaration of `write' after
   first use results in unspecified behavior


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1149
2002-10-01 00:25:04 +00:00
Julian Seward
e959615698 Fix build problems on SuSE 8.1 -- -I.. not included in compile cmds
for .S files.  Possibly due to the presence of the following on this dist:

  autoconf (GNU Autoconf) 2.53
  automake (GNU automake) 1.6.3


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1148
2002-10-01 00:18:22 +00:00
Julian Seward
81b048c0c2 Remove comment that nobody can make sense of.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1147
2002-09-30 23:22:54 +00:00
Julian Seward
84ec9e3d9d Give weak global binding for fns which are to be superposed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1146
2002-09-30 23:17:49 +00:00
Julian Seward
45e965200b Rename VG_(kill) and VG_(sigpending) to VG_(kkill) and VG_(ksigpending)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1145
2002-09-30 23:12:33 +00:00
Julian Seward
04a8657df5 Add big comment explaining how the LDT simulation works.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1144
2002-09-30 22:56:26 +00:00
Julian Seward
18ab365182 layout wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1143
2002-09-30 22:56:03 +00:00
Julian Seward
30604013af Clean up messages a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1142
2002-09-30 22:06:28 +00:00
Julian Seward
1938a2fc05 Teach memcheck about instrumenting {GET,PUT,USE}SEG.
Also implement MOV Sw,Ew.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1141
2002-09-30 21:52:50 +00:00
Nicholas Nethercote
f73db69709 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1140
2002-09-30 13:18:41 +00:00
Julian Seward
a03f1877f6 Second half of the LDT support. It basically works now.
- New core uinstrs, GETSEG, PUTSEG (save and restore segment regs)

- New core uinstr USESEG, which takes a segment selector and a
  virtual address, and returns a linear address -- and also does
  a limit check.  This calls through to VG_(use_ldt) in vg_ldt.c.

- Insn parser (disAMode) made aware of segment override prefixes

- Obvious fixes to insn emitter and translators

None of the skins understand these new uinstrs, so only --skin=none
works with them at the mo.  This and some other rough edges still
need to be fixed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1139
2002-09-30 12:33:11 +00:00
Nicholas Nethercote
3c9c4b2074 Added profiling events for core/skin cheap/expensive sanity checks.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1138
2002-09-30 11:24:00 +00:00
Nicholas Nethercote
813e2b76f1 Makefile.am wibbles:
- added some missing SUBDIRS variables
  - removed unnecessary coregrind/demangle/ from some INCLUDES lists


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1137
2002-09-30 10:48:07 +00:00
Nicholas Nethercote
9c96730cfb Made some debugging printf's only take place at verbosity > 1, because the
output was causing some regression tests to fail.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1136
2002-09-30 10:47:35 +00:00
Nicholas Nethercote
4cd67f62e6 Converted all functions visible from vg_skin.h with names in CamelCaps to
use_under_scores instead, to be consistent.

Also added some missing 'extern's on function declarations in vg_skin.h.

Also added a quick note in vg_regtest.in on the simplest way to run regression
tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1135
2002-09-30 10:23:54 +00:00
Julian Seward
f0e299960b Get rid of nvidia_moan(); soon we might not have anything to moan about.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1134
2002-09-30 00:57:24 +00:00
Julian Seward
e5159f48cc First half of the long-overdue support for segment override prefixes,
LDTs and __NR_modify_ldt.

- Each thread has its own LDT.  Usually NULL, but if we need to
  change an entry, it is allocated.  LDTs are inherited from parents
  as one would expect.

- We intercept __NR_modify_ldt and update the calling thread's LDT
  accordingly.  This is done in coregrind/vg_ldt.c.  The kernel
  never sees these syscalls.

- New architectural state for %cs, %ss, %ds, %es, %fs and %gs.
  Probably overkill including %cs and %ss.  These are saved and
  restored in the usual way, _except_ at syscalls -- there's no
  point, since we are hiding all LDT operations from the kernel now.
  This does assume that no syscall implicitly looks at the
  segment registers, but I think that's safe.

Still only halfway there.  JITter is still unaware of seg regs
and override prefixes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1133
2002-09-30 00:53:10 +00:00
Nicholas Nethercote
284d18dc8f wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1126
2002-09-27 11:45:30 +00:00
Nicholas Nethercote
25a0f7f195 Update Cachegrind docs to refer to cg_annotate' not vg_annotate'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1125
2002-09-27 10:47:46 +00:00
Nicholas Nethercote
ece3c54af1 Moved the OINK macro into vg_skin.h so that skins can use it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1124
2002-09-27 10:42:20 +00:00
Nicholas Nethercote
0eb6b6654a Changed test so the output doesn't depend on the order in which the parent and
child run;  this was random so the test was failing spuriously sometimes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1123
2002-09-27 10:38:20 +00:00
Nicholas Nethercote
ad2f86232e Added some reasonably thorough documentation on how to write skins. Also added
an example skin which is referred to in the documentation, and is designed to
be a template which can be copied.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1122
2002-09-27 10:29:51 +00:00
Nicholas Nethercote
69f08db9a5 Lots of minor comment changes, etc, just to make it clearer to skin writers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1121
2002-09-27 10:24:48 +00:00
Nicholas Nethercote
1a927a7334 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1120
2002-09-27 10:12:45 +00:00
Julian Seward
70cfbabc36 "Um, the cachegrind script doesn't exist in the head, and vg_annotate has
been renamed cg_annotate..."


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1119
2002-09-27 09:40:52 +00:00
Nicholas Nethercote
8af201d0ca Moved vg_regtest to vg_regtest.in, using autoconf so vg_regtest now knows where
the `valgrind' script is kept, so people who install valgrind in a directory
other than the one I do don't need to use the --valgrind option all the time.

As a consequence, vg_regtests is now installed in and run out of bin/, rather
than tests/.

Also added a GPL copyright notice to vg_regtests.in.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1118
2002-09-27 08:44:17 +00:00
Nicholas Nethercote
95ee50f064 Changed the regression testing options --head and --eraser to --stable and
--dev, because the old ones were now totally confusing (since --head no longer
applies to HEAD).  Had to change a couple of .vgtest "vgopt:" lines for this.
Unfortunately the --stable result files are still *.stderr.exp.hd" because
changing them via CVS is a pain.

Also improved documentation in script slightly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1117
2002-09-27 08:26:27 +00:00
Julian Seward
97593208db merge rev 1.29.2.5:
Implement primary opcode 0x10 (ADC Gb,Eb).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1116
2002-09-27 01:29:26 +00:00
Julian Seward
7f7cd4c3f4 merge rev 1.7.2.3:
valgrind's strcmp() implementation (to clients) treats char as signed
whereas the libc implementation it replaces treats char as unsigned.
Fix!  God knows how anything much ever worked before now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1115
2002-09-27 01:26:34 +00:00
Julian Seward
d3b9709488 merge rev 1.16.2.3:
Fix bug in 108-byte load/stores.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1114
2002-09-27 01:11:36 +00:00
Julian Seward
842fda69b1 merge rev 1.76.2.7:
Increase VG_N_RWLOCKS from 50 to 500.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1113
2002-09-27 01:04:29 +00:00
Julian Seward
c97cab7c06 merge rev 1.8.2.1:
Add as many suppressions as I reasonably can for SuSE 8.1.  There's
still a lot of junk, but that can only be fixed by a more direct
tackling of gcc-3.2's bad habits.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1112
2002-09-27 00:58:10 +00:00
Julian Seward
c7f7a85487 merge rev 1.29.2.3:
Fix stupid bug in which vg_push_signal_frame/vg_pop_signal_frame assumed
that the handler wouldn't change the signal-number parameter it was passed.

Fixes this:
   vg_signals.c:1065 (vgPlain_signal_returns):
   Assertion `sigNo >= 1 && sigNo <= 64' failed.
and possibly arbitrary other mutancy in the signal handling too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1111
2002-09-27 00:46:59 +00:00
Julian Seward
9240e8b8b0 merge revs 1.2.2.2 and 1.2.2.3 (which probably don't make sense in
the head, but still ..)

  Source is .tar.bz2 not .tar.gz

  Added cachegrind and vg_annotate to the spec file, as suggested by
  Rafael Garcia-Suarez <rgarciasuarez@free.fr>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1110
2002-09-27 00:42:41 +00:00
Nicholas Nethercote
8ebeaef638 Change #include so that "make distcheck" works.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1109
2002-09-24 11:23:50 +00:00
Nicholas Nethercote
f68cbf9ea9 wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1104
2002-09-23 16:56:39 +00:00