Fix all the places where gcc complains about casts from pointers
(presumably 64 bit) to integers of different size (in this case,
32-bit int). This makes it compile cleanly on 64-bit AIX and also
means it doesn't crash :-)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6297
Use 'ctr' rather than 'lr' for indirect jumps, so as not to trash the
branch predictor(s) for returns from generated code. Makes a big
difference on ppc970 (and POWER4).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6291
- add extra fields to ThreadOSState to make thread cancellation sort-of
work on AIX5
- add function VG_(count_runnable_threads)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6288
AIX5 support. No changes in logic; just better factorisation of what
is already here.
- add AIX definitions for VG_UCONTEXT_INSTR_PTR et al
- add abstractions VKI_SIGINFO_si_addr and VKI_SIGINFO_si_pid
to enable the rest of the code to be uniform
- track other minor changes: SysRes, VG_(am_find_nsegment)
constness, rearrangement of VG_(sigtimedwait).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6287
Track SysRes change, and remove unused stuff in header. Perhaps
this should be folded into m_initimg in the fullness of time.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6286
Generalise the machinery developed for function intercepts/wrapping
ppc64-linux, in which we have to deal with the big extra complexity
resulting from TOC pointers. This generalises it to work in 32-bit
mode too.
Add helpers to deal with AIX stack redzones.
Track VG_(am_find_nsegment) constness change and other minor
changes to the m_aspacemgr interface.
(All platforms): use the new VexMiscInfo structure to tell VEX about
host and guest ABI conventions.
This module could do with further tidying up and documentation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6282
Minor adjustments to the scheduler, mostly cosmetic.
- rename VG_(kill_thread) to VG_(get_thread_out_of_syscall), which
is what it actually does.
- Remove 'semaphore' terminology in places and use 'lock' instead.
- Give an extra 'HChar* who' arg to VG_(set_running) and
VG_(set_sleeping), which is printed when --trace-sched=yes.
This makes it easier to make sense of lock ownership changes
from the debug output.
- various other improvements to debug printing
- add a kludge to encourage the AIX scheduler to switch threads
more often when more than one is runnable (am not claiming to
understand this); otherwise CPU starvation can appear to happen
- more assertions in sema.c (the pipe-based lock); cycle the token
through 'A' to 'Z' to make strace/truss output more understandable;
fix longstanding bug wherein sema_down() tries to read two bytes
even though sema_up only writes one.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6281
Minor enhancements, including dealing with 6-digit PIDs, dealing with
object names of the form "foo.a(bar.o)", and removing debuglog level
zero output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6278
- track SysRes changes
- track VG_(am_find_nsegment) const-ness change
- increase number of client syscall args supported from 6 to 8
- simplify type SyscallStatus. Simply hold a copy of the SysRes
for the syscall rather than have this be a data structure
incorporating something very similar to the fields of a SysRes,
and more besides. Change various macros in priv_types_n_macros.h
to match.
- syswrap-main.c: instantiate the various impedance-matching
functions for AIX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6276
- Minor changes for mpxlc
- kludge; add option "initkludge" to cause PMPI_Init to return
&mpiwrap_walk_type_EXTERNALLY_VISIBLE
and adjust mpiwrap_type_test.c accordingly
and also add an export script so that libmpiwrap.so is built
correctly on AIX5 (r????).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6275
Convert some VG_ names (global visibility) into ML_s (module scope).
and also handle Z-encoded 'ZL' == ( and 'ZR' == )
for intercept/wrapper fn names
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6274
Track SysRes change; support bigpage allocation on AIX; make the
client-arena superblocks much bigger on AIX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6273
Accumulate statistics about the number of searches in the errors and
suppressions lists, and rearrange the suppressions list when searching
to reduce cost of future searches.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6271
Inline stackPush and stackPop and placate gcc's resulting concerns
about uninitialised variables.
and also change ownership.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6270
Minor changes for redirection on AIX. The only significant change is
that it now checks for, warns about and disallows, attempts to
redirect to, or wrap with, a function for which no TOC pointer can be
found, since that would be really asking for trouble (a segfault).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6269
Change the SysRes type so as to represent both the error value and the
non-error result at the same time.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6268
- AIX implementations of various stuff, nothing surprising.
- For all platforms: make VG_(read) and VG_(write) return (negative)
actual error values rather than producing -1 for all failures.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6267
Changes to support XCOFF:
- allow modules to have 'member names' as well as file names. A member
name is a "foo.o" name inside a "bar.a"; necessary as AIX
keeps all its dynamic libraries in .a files.
- rename the type RiLoc to DiLoc (this holds a line number indication).
No idea why it was called RiLoc in the first place.
- trace changes in type SysRes
- implement VG_(di_aix5_notify_segchange)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6266
Interface changes for m_debuginfo:
- new fn VG_(di_aix5_notify_segchange) to notify XCOFF loads/unloads
- new fn VG_(lookup_symbol_SLOW) for looking up the address of a fn
given its name and soname
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6265
New option --sym-offsets=yes|no [no], which causes all symbols to be
shown in the form 'name+offset'. Mostly useful for debugging Valgrind
itself.
Also move command-line-error functions from m_main into m_options.
[Will move them back shortly.]
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6263
Extensions for unwinding stacks on ppc32-aix5 and ppc64-aix5. Also,
extend the mechanism developed for ppc64-linux for fishing return
addresses out of the thread's redirection-stack when needed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6261
Get rid of VG_(sigtimedwait) and replace it a simpler version,
VG_(sigtimedwait_zero), which polls for signals and returns
immediately. AIX doesn't have a sigtimedwait syscall, so in that case
try and implement VG_(sigtimedwait_zero) using various other signal
syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6259