2365 Commits

Author SHA1 Message Date
Nicholas Nethercote
a00ea1b94b fix for #113230
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4751
2005-09-24 19:42:41 +00:00
Cerion Armour-Brown
8f1185f0df Rename VG_(have_altivec) => VG_(have_altivec_ppc) for consistency.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4641
2005-09-13 16:47:00 +00:00
Cerion Armour-Brown
d4678699e7 setup new variable VG_(have_altivec) from auxv::AT_HWCAP
fixed default VSCR in dispatch-ppc32.S (non-java mode = 1)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4636
2005-09-13 11:13:43 +00:00
Cerion Armour-Brown
17d2cd1342 assert ppc guest_state vector regs are 16byte aligned
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4627
2005-09-12 22:53:39 +00:00
Julian Seward
010862f024 Unbreak ppc32 build.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4608
2005-09-06 08:43:15 +00:00
Nicholas Nethercote
ebb0bb7a05 Unbreak amd64 and ppc32 some more.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4607
2005-09-01 16:27:28 +00:00
Nicholas Nethercote
38e6ac5ae8 Fix AMD64 breakage and possibly the PPC32 breakage, too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4606
2005-09-01 03:35:40 +00:00
Nicholas Nethercote
1394091f86 Moved sys_mmap2 wrapper from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4595
2005-08-31 03:00:40 +00:00
Nicholas Nethercote
c198b967b3 Moved some more syscall wrappers from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4594
2005-08-31 02:44:31 +00:00
Tom Hughes
4c19c1fef0 Quote some more CC expansions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4592
2005-08-30 21:07:23 +00:00
Tom Hughes
abd818b4c0 Quote the expansion of CC when invoking make for VEX. Fixes bug #111785.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4589
2005-08-30 18:47:35 +00:00
Nicholas Nethercote
b951ee0662 unbreak ppc32, I hope
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4584
2005-08-30 03:02:00 +00:00
Nicholas Nethercote
b706da9aa9 Group Linux-specific syscalls a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4581
2005-08-30 02:45:44 +00:00
Nicholas Nethercote
b79e7281d4 Moved sched_* from "generic" to "linux"; Darwin doesn't have them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4576
2005-08-30 02:17:23 +00:00
Nicholas Nethercote
40eb28bec1 Move *xattr from "generic" to "linux". Darwin has them, but with an extra
parameter.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4575
2005-08-30 01:53:54 +00:00
Julian Seward
42b4516a9d Pass $(CC) to the vex Makefile.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4559
2005-08-29 12:11:06 +00:00
Tom Hughes
cf8c1b047f Handle the SCTP_GET_LOCAL_ADDRS and SCTP_GET_PEER_ADDRS getsockopt
calls correctly. Fix to bug #111231.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4549
2005-08-28 10:16:29 +00:00
Nicholas Nethercote
63df7df1c8 Give file a better name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4546
2005-08-28 04:48:12 +00:00
Nicholas Nethercote
e1d86426b2 Move the core dumping code out of m_signals to a new module,
m_coredump.  The code is still commented out, though.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4545
2005-08-28 04:38:12 +00:00
Nicholas Nethercote
9d7e8b9ab2 Move some kernel constants to the right place.
Also reinstated SF_DEVICE, which is used to ensure we don't try and
leakcheck a page that is mapped from a device.  This got lost in the
2.x-to-3.x transition, or some time after.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4538
2005-08-27 17:20:53 +00:00
Nicholas Nethercote
ccad5e3600 Change slightly the way integers are printed by printf() and friends.
Previously, %d printed a 32-bit int.  %ld and %lld printed 64-bit ints.
So if you wanted to print a word-sized int (eg. a SizeT variable), you
had to cast it to a Long and then print with %lld in order to work on
both 32-bit and 64-bit platforms.

I changed things so that %d prints a 32-bit int, %ld prints a word-sized
int, and %lld prints a 64-bit int.  There are two advantages to this:
- it now matches the way the normal glibc printf() works;
- you can print word-sized ints without casting.

I also made the corresponding change for %u/lu/llu and %x/lx/llx, and I
changed a couple of VG_(printf)() invocations accordingly.





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4527
2005-08-26 19:42:27 +00:00
Nicholas Nethercote
45fc4050f8 Move *chown16 syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4523
2005-08-26 04:36:10 +00:00
Nicholas Nethercote
1d0665b897 whoops
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4522
2005-08-26 04:30:34 +00:00
Nicholas Nethercote
1fa6f9bf7a Move get*16 and set*16 syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4521
2005-08-26 04:27:54 +00:00
Nicholas Nethercote
7fd1f02169 Move cap{get,set} syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4520
2005-08-26 04:03:04 +00:00
Nicholas Nethercote
832989d4af Move timer_* syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4519
2005-08-26 03:54:30 +00:00
Nicholas Nethercote
c42361bf17 Move clock_* syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4518
2005-08-26 03:49:43 +00:00
Nicholas Nethercote
c710281899 Move mq_* syscalls from "generic" to "linux".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4517
2005-08-26 03:43:28 +00:00
Nicholas Nethercote
cc1a038667 comment-only wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4515
2005-08-25 22:55:19 +00:00
Nicholas Nethercote
ed0bcea859 Rename vg_preload_core.so to vgpreload_core.so to be consistent with
tool preload modules, which are called vgpreload_<tool>.so.  Also
fixed a couple of comments relating to this.

(This need not be merged into 3_0_X.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4514
2005-08-25 22:53:57 +00:00
Nicholas Nethercote
f7a9f38df7 avoid unnecessary newlines
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4513
2005-08-25 01:52:52 +00:00
Nicholas Nethercote
3abe14bc49 Only show the "line number too large" warning once.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4511
2005-08-25 00:20:56 +00:00
Nicholas Nethercote
281297db9f Fix a problem I introduced in r4208 when reducing the space used by
heap blocks.  The minimum size for redzones is now sizeof(void*), but
I forgot to ensure this.  Massif was asking for 0 byte redzones, and this
was screwing things up on 64-bit platforms, and Massif was dying very
quickly.  This should fix bugs #111090 and #111285.

The fact that Massif was this badly broken but there were only 2 bug reports
indicates that not many people are using it, at least not on AMD64.

I also added a regtest that does some basic malloc/realloc/free testing
for Massif, which would have caught this problem.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4492
2005-08-24 22:38:00 +00:00
Nicholas Nethercote
e266e53970 Minor fixes for problems pointed out by Greg Parker:
* The wrapper for fcntl(F_SETOWN) and fcntl(F_SETSIG) ignores ARG3,
  but should not.

* Linux PRE(sys_umount) doesn't print ARG2.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4487
2005-08-24 13:55:59 +00:00
Nicholas Nethercote
c0f9842cf0 avoid compiler warning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4484
2005-08-24 01:56:15 +00:00
Nicholas Nethercote
f55a9512e0 Make the allocator's access functions slightly stricter in their
checking of the lo/hi size fields.  If we are corrupting the metadata,
this should make it more likely that we get an assertion failure rather
than an outright crash.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4480
2005-08-23 22:11:20 +00:00
Julian Seward
4768087f6f Even more ppc32 syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4474
2005-08-21 00:49:41 +00:00
Tom Hughes
596e2787a5 Make sure vex_svnversion.h is updated after an svn update and declare
the libvex.a target as phone to ensure that we always try and rebuild
it in case there have been changed in the VEX code.

The partially fixes bug #110770.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4473
2005-08-20 16:26:04 +00:00
Julian Seward
dc5f079f45 rm now-redundant macros.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4465
2005-08-19 20:23:05 +00:00
Julian Seward
ae8dfb4531 Incorporate a patch from Craig Chaney which gives better stack
snapshots on ppc32-linux in the presence of functions subject to
leaf-function optimisations.

At the same time, simplify the stack unwinding logic by basically
implementing it separately for each target.  Having a single piece of
logic for amd64 and x86 was tenable, but merging ppc32 into it is too
confusing.  So now there is an x86/amd64 unwinder and a ppc32
unwinder.

This requires plumbing a link-register value into
VG_(get_StackTrace2), and that in turn requires passing it around
several other stack-trace-related functions.  Hence 7 changed files.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4464
2005-08-19 16:02:59 +00:00
Julian Seward
b42cf14c30 Enable a few more syscalls on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4463
2005-08-19 10:07:29 +00:00
Julian Seward
c3de347191 - Fix bug causing thread slots not to get reused
- yet more syscalls on ppc32


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4460
2005-08-19 00:22:44 +00:00
Julian Seward
f964ed405c Enable a couple more syscalls on ppc32.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4449
2005-08-18 23:44:13 +00:00
Nicholas Nethercote
4fb787504c Make show_segments() public, and use it when VG_(get_memory_from_mmap)()
fails.  This might help debugging.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4448
2005-08-18 16:40:23 +00:00
Nicholas Nethercote
224dad480c Make it possible to match against "???" line in suppressions,
using "obj:*" or "fun:*".  Also generate "obj:*" for such lines
with --gen-suppressions.  Includes a regtest.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4447
2005-08-18 15:49:21 +00:00
Julian Seward
ba3fdbc461 The strlen that ld.so uses on ppc32 causes a lot of false errors in
memcheck, and they are hard to get rid of and hard to suppress.  So
add a bootstrap strlen function and redirect to it right from the
start.  This fn only replaces the strlen in ld.so; the "normal"
redirect mechanism still replaces the strlen that glibc supplies.

This commit finally (!) makes memcheck behave sanely on ppc32.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4445
2005-08-18 11:54:30 +00:00
Nicholas Nethercote
64974a1033 Added VG_(OSet_LookupWithCmp)(), which can be useful.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4444
2005-08-17 21:06:07 +00:00
Tom Hughes
79342fc67f Pass AM_CFLAGS to the compiler when extracting the default linker
script so we are sure to get the 32 bit version when appropriate.

Also pass ARCH_CORE_AM_CFLAGS in EXTRA_CFLAGS when building VEX so
we can be sure to build a 32 bit VEX when appropriate.

This should fix bug #110830.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4442
2005-08-17 08:50:51 +00:00
Nicholas Nethercote
d2d79a668a Partial implementation of mallinfo(). It still puts zero in all
the fields, but all the plumbing is now there so that m_mallocfree.c
can fill them in.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4441
2005-08-17 05:01:37 +00:00
Nicholas Nethercote
dbae71819c malloc_usable_size() was totally broken, crashing immediately.
I guess it's not very widely used :)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4439
2005-08-17 04:03:31 +00:00