History log of /external/valgrind/coregrind/vgdb-invoker-ptrace.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b3a1e4bffbdbbf38304f216af405009868f43628 21-Aug-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates, to include 2015. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
ad4e979f408239dabbaae955d8ffcb84a51a5c85 05-Jul-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Fixes BZ #349874


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15394 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
112711afefcfcd43680c7c4aa8d38ef180e8811e 10-Apr-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a port to Linux/TileGx. Zhi-Gang Liu (zliu@tilera.com)
Valgrind aspects, to match vex r3124.

See bug 339778 - Linux/TileGx platform support to Valgrind



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15080 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
b12f502f96dee3ead809420943ce5386ded4775a 09-Feb-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Ensure vgdb gets the nr of threads from Valgrind via shared memory,
rather than using a compile time constant.
This is in preparation for a future change by Florian, to have
the max nr of threads specifiable at startup via a clo


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14924 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
5f9116d2675ee30ebb894ce13bd4e7597567b363 05-Jan-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Avoid warning on Addr sp, unused on some platforms (e.g. ppc32)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14850 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
4769c3c0594bb0cbfd31a953ed39dafbe108605c 04-Jan-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> * Remove useless typedef and uses of Addr32 and Addr64, just use Addr
* uses correct filename in "dying here #ifdef"
* small reformat


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14847 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
7b7d59405204f88cb944155d6bc5114025ebda98 19-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Buffer audit. Resize a few.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14824 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
3629f4a3d4a0237421da38f5f5cdf6fcfa368d03 24-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Glibc versions prior to 2.5 do not define PTRACE_GETSIGINFO
(determined by Patrick J. LoPresti).
Tweak the ifdeffery.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14565 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
ee0ee03c426c9712903cfa17cdca12bc6134807e 02-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a few incorrect format strings. Spotted by the Coverity checker.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14433 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
582d58245637ab05272d89fb94b12fd0f18fa0f8 08-Aug-2014 carll <carll@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit is for Bugzilla 334834. The Bugzilla contains patch 2 of 3
to add PPC64 LE support. The other two patches can be found in Bugzillas
334384 and 334836.

POWER PC, add the functional Little Endian support, patch 2

The IBM POWER processor now supports both Big Endian and Little Endian.
The ABI for Little Endian also changes. Specifically, the function
descriptor is not used, the stack size changed, accessing the TOC
changed. Functions now have a local and a global entry point. Register
r2 contains the TOC for local calls and register r12 contains the TOC
for global calls. This patch makes the functional changes to the
Valgrind tool. The patch makes the changes needed for the
none/tests/ppc32 and none/tests/ppc64 Makefile.am. A number of the
ppc specific tests have Endian dependencies that are not fixed in
this patch. They are fixed in the next patch.

Per Julian's comments renamed coregrind/m_dispatch/dispatch-ppc64-linux.S
to coregrind/m_dispatch/dispatch-ppc64be-linux.S Created new file for LE
coregrind/m_dispatch/dispatch-ppc64le-linux.S. The same was done for
coregrind/m_syswrap/syscall-ppc-linux.S.

Signed-off-by: Carl Love <carll@us.ibm.com>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14239 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
cae0cc22b83ffb260ee8379e92099c5a701944cb 08-Aug-2014 carll <carll@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit is for Bugzilla 334384. The Bugzilla contains patch 1 of 3
to add PPC64 LE support. The other two patches can be found in Bugzillas
334834 and 334836. The commit does not have a VEX commit associated with it.

POWER PC, add initial Little Endian support

The IBM POWER processor now supports both Big Endian and Little Endian.
This patch renames the #defines with the name ppc64 to ppc64be for the BE
specific code. This patch adds the Little Endian #define ppc64le to the

Additionally, a few functions are renamed to remove BE from the name if the
function is used by BE and LE. Functions that are BE specific have BE put
in the name.

The goals of this patch is to make sure #defines, function names and
variables consistently use PPC64/ppc64 if it refers to BE and LE,
PPC64BE/ppc64be if it is specific to BE, PPC64LE/ppc64le if it is LE
specific. The patch does not break the code for PPC64 Big Endian.

The test files memcheck/tests/atomic_incs.c, tests/power_insn_available.c
and tests/power_insn_available.c are also updated to the new #define
definition for PPC64 BE.

Signed-off-by: Carl Love <carll@us.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14238 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
3b4ef11d87596b6d63d690caf517a3abf62d39d4 27-Jul-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> glibc 2.3.4 does not appear to define PTRACE_GETSIGINFO. This was
observed on a RHEL5 system on s390. Provide a suitable definition.
Tweak gdbserver_tests/filter_stderr to ignore messages related to
interrupted poll system calls.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14197 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
2a429f5d70a41ab1673c9f2ec220e8a10d8c90d5 18-Jul-2014 mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add configure check for arm64 user_regs_struct.

old glibc defined kernel user_pt_regs, but newer glibc instead
define user_regs_struct. Add a configure test to see what we need.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14176 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
7136e5f14ebcb8117f629becf48bc8a49ab0b5af 21-May-2014 carll <carll@a5019735-40e9-0310-863c-91ae7b9d1cf9> vgdb, fix error print statement.

This patch fixes printing the first not delivered signal.

Signed-off-by: Carl Love <carll@us.ibm.com>

This bug was reported in bugzilla 335155.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13987 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
c07369bc8be6f6a26adfdbe391be7fe64a211829 17-May-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Enable vgdb ptrace invoker for aarch64.

This only works in non-bi arch mode. If ever aarch64+arm
are compiled bi-arch, then some more work is needed to have
a 64 bits vgdb able to ptrace invoke a 32 bits valgrind.

Note also that PTRACE_GETREGSET is defined on other platforms
(e.g. ppc64 fedora 18 defines it), but it is not used on
these platforms, as again, PTRACE_GETREGSET implies some
work for bi-arch to work properly.
So, on all platforms except arm64, we use PTRACE_GETREGS
or PTRACE_PEEKUSER.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13981 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
6654de8547d2e420c20e21980669b807aa80710e 16-Apr-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> vgdb must not transmit signals when gdbserver has been ptrace-invoked.

Most of the time, Valgrind masks async signals, and polls for such
signals at regular interval.
There is a very narrow range of code (around client syscall logic)
where such signals are unmasked (as they must be able to interrupt
syscalls).
This is the only range of code where Valgrind is expecting to
receive such a signal.

When gdbserver is ptraced invoked, Valgrind is artificially made
to jump out of this code portion. Signals are not masked.
When ptraceing valgrind, vgdb will get these signals but cannot
transmit them immediately, otherwise they arrive in range
of code where they are not expected (causing internal error
in syscall logic) and/or causing gdbserver syscalls to be
interrupted.

3 solutions to solve that were looked at:
1. have the gdbserver code masking signals "as quickly as possible".
Easy to implement, but this leaves still a small window
of code where signals are not masked and would cause a problem.
2. have vgdb setting the SIGMASK of valgrind before invoking
gdbserver.
This would be easy to implement, but changing the SIGMASK
of the ptrace-d process is only available on very recent kernels.
3. have vgdb queuing signals, and only transmitting them once
gdbserver invocation is finished.
This 3rd solution has been implemented.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13896 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c
3c761f0f0344757ac243c65511392fb41d1c841a 01-Dec-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix 326462 Refactor vgdb to isolate invoker stuff into separate module

vgdb.c contained (conditionally compiled) "invoker" code to have ptrace syscalls
used to allow gdb/vgdb to connect to a valgrind process blocked in a syscall.
This "invoker" code is ptrace based.
Not all platforms are using ptrace.
=> refactor vgdb so as allow invoker code to be added more cleanly
for non ptrace based platforms (e.g. Darwin, Solaris).

* add file vgdb.h for:
- definition of the vgdb-invoker interface
- common declarations between vgdb.c and vgdb-invoker implementations
* move ptrace related code from vgdb.c to new file vgdb-invoker-ptrace.c
* new file vgdb-invoker-none.c containing an empty invoker implementation
used on platforms that do not (yet) have a invoker implementation
(e.g. android and darwin).
* modified Makefile.am to use one of the vgdb-invoker-*.c file depending
on the platform.
* small changes related to changing ptraceinvoker to invoker in various files:
gdbserver_tests/make_local_links, gdbserver_tests/nlcontrolc.vgtest,
gdbserver_tests/mcinvokeRU.vgtest, gdbserver_tests/nlsigvgdb.vgtest
gdbserver_tests/mcinvokeWS.vgtest, coregrind/m_gdbserver/README_DEVELOPERS

Patch from Ivo Raisr, slightly modified



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13743 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/vgdb-invoker-ptrace.c