History log of /external/valgrind/coregrind/m_signals.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f618565d1e46d9dfb2f94198c8fe740ca429c528 17-May-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> When process dies due to a signal, show the signal and the stacktrace
at default verbosity


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15251 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
b301469137f05afa7288790a67ed0628df1efb7e 17-May-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> * Let GDB user modify the signal to send to the guest process
* implement qXfer:siginfo:read: packet to allow GDB to show $_siginfo



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15248 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
9069406156afe05386f512be5689dcd24c61deed 16-May-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Enable a few more compiler warnings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15243 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
75712710b9c49eedcf4f9caa7d7e17494ac3acf8 30-Apr-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove a few embarassing comments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15169 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
7d4a28b986eaf98814c530a2074e117145b14d1f 23-Apr-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix an assertion in the address space manager. BZ #345887.
The VG_(extend_stack) call needs to be properly guarded because the
passed-in address is not necessarily part of an extensible stack
segment. And an extensible stack segment is the only thing that
function should have to deal with.
Previously, the function VG_(am_addr_is_in_extensible_client_stack)
was introduced to guard VG_(extend_stack) but it was not added in all
places it should have been.

Also, extending the client stack during signal delivery (in sigframe-common.c)
was simply calling VG_(extend_stack) hoping it would do the right thing.
But that was not always the case. The new testcase
none/tests/linux/pthread-stack.c exercises this (3.10.1 errors out on it).

Renamed ML_(sf_extend_stack) to ML_(sf_maybe_extend_stack) and add
proper guard logic for VG_(extend_stack).

Testcases none/tests/{amd64|x86}-linux/bug345887.c by Ivo Raisr.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15138 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
72dabf4f1693d23da3bfa972cb3c9a149372e4f4 20-Apr-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use the proper function.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15118 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
4465bd57367575b7c1016f3b802df100f89f1e67 14-Apr-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Followup to r14974. That revision oversimplified a condition, part
of which was presumed to be redundant but wasn't. This caused code
to hang due to an infinite signal-delivery loop. Observed and
tracked down by Austin English.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15091 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.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/m_signals.c
017d8f5410cff379575eee4f5056fb1a82a6526b 23-Mar-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add VG_(am_is_bogus_client_stack_pointer)(Addr).
The function is used in VG_(client_syscall) to avoid extending the stack
when it is clear that the current value of the stack pointer does not
point into a segment that looks like a stack segment.
See the comments in the code there.
As a side effect of this we can now revert r15018 which increased
the stack size of the alternate stack in memcheck/tests/sigaltstack.c.
The reason is that the belief at the time: "alternate stack is too small"
was not correct. What instead happened was that VG_(client_syscall) called
VG_(extend_stack) without need (the syscall was tgkill) and the new stack
pointer happened to be in a file segment.
In other words: the current stack pointer was still within the alternate
stack, i.e. the alternate stack was (barely) large enough.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15034 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
15fa8a2f9b64e24c76ef88d8bf660ea2296f0c36 03-Mar-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Produce a user message in case of stack overflow.
Change VG_(extend_stack) and VG_(am_extend_into_adjacent_reservation_client)
accordingly.
Remove some redundant checking.
Add testcase.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14974 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
be38cddd7a8cea39a0a4474d340c5add036e192b 02-Mar-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update a comment. Apparently the code was refactored at some point...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14973 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
888b8159535580b30550f99cb7361f62edd83100 26-Feb-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change the prototype of VG_(am_extend_into_adjacent_reservation_client)
to match VG_(am_extend_map_client) for consistency.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14965 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
d2190294c9f873c2bb8b6eaa26bfc7a84a2c24a0 08-Jan-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Comment only changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14858 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
f44ff62031a5344468774ada6f1b7375dfd85e7b 20-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Buffer audit. Resize some.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14825 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.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/m_signals.c
2d1f256d8ed8ee505a794d5787334cc9b7314a48 19-Sep-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix 339156 - gdbsrv not called for fatal signal

In preparation for removing --db-attach=yes, call gdbserver
for a fatal signal (where --db-attach=yes is also calling gdb)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14556 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
77eb20b3865e7b17c7695c7e7a526b52935f593e 11-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use wrapper functions VG_(malloc) and friends consistently across the
board (instead of e.g. VG_(arena_malloc)(VG_AR_CORE,...). This change
also benefits static analysers. We can tell tools that VG_(malloc) allocates
and VG_(free) deallocates and that they are a pair. But we cannot do that for
arena_malloc/free.
Also provide a wrapper VG_(realloc_shrink).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14517 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.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/m_signals.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/m_signals.c
f0c1250e324f6684757c6a15545366447ef1d64f 12-Jan-2014 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for ARMv8 AArch64 (the 64 bit ARM instruction set).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13770 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
dfa54a53736ab016611db71c37b3e34a96d9f604 13-Mar-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix 316535 Use of |signed int| instead of (unsigned) |size_t| in messages...
* when SEGV trapped, report the main thread size as an unsigned size_t
* Similar for memcheck overlap errors
For example, for the 2 calls:
memcpy(&a, &a, 2147483648UL);
memcpy(&a, &a, -1); // silently accepted by gcc 4.4.4 -Wall
// while the 3rd arg is supposed to be a size_t
we now obtain (on a 32 bit system)
Source and destination overlap in memcpy(0xbe97113f, 0xbe97113f, 2147483648)
Source and destination overlap in memcpy(0xbef6d13f, 0xbef6d13f, 4294967295)
instead of
Source and destination overlap in memcpy(0xbe8e012f, 0xbe8e012f, -2147483648)
Source and destination overlap in memcpy(0xbe8e012f, 0xbe8e012f, -1)

Do not ask me why
memcpy(&a, &a, -1);
is supposed to be accepted/acceptable/valid code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13326 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
448e2bf1b27189c0a6188bd4b294b74f1bedbdb6 03-Mar-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Better document an ignored return value.
The call to VG_(gdbserver_report_signal) is ignored
in synth_fault_common (m_signals.c) as these signals
are always to be delivered (as explained by the following
comment).
=> better document that the return value is ignored on purpose.
(spotted by Florian, using Coverity)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13306 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
4df0bfc0614379192c780c944415dc420d9cfe8e 28-Feb-2013 petarj <petarj@a5019735-40e9-0310-863c-91ae7b9d1cf9> mips: adding MIPS64LE support to Valgrind

Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
fcd9635fb77640cdf72dff8b7fcf52c5876bf0ff 21-Jan-2013 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove unneeded test. "info" cannot be NULL here as it was dereferenced
previously. Spotted by Coverity's checker.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13255 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
3e7986312a0ffc7646b0552d4c4ea3744a870e73 24-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix some casts that removed const-ness as pointed out by
GCC's -Wcast-qual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13138 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
80e5c17a2a2832793a2d4962fa8264025641e47e 19-Oct-2012 petarj <petarj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a proper support for several MIPS instructions that generate SigFPE.

Add support to properly handle TEQ, ADD and SUB instructions that generate
exceptions on MIPS platforms. A SignalException test for MIPS32 has also been
added, so we can cover more cases.

This resolves:

none/tests/faultstatus
gdbserver_tests/mcsignopass
gdbserver_tests/mcsigpass


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13059 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
2b8059ad8e01f0928e8767ae25b9103c4ef15f18 14-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix some more Char / HChar mixups


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13042 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
2baf7530db4074d01a1a0fc8673c975bf2b50787 26-Jul-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Due to s390's dealings with invalid insns we need to do two things
- advance the guest_IA to the next insn after raising the signal
- adjusting the address in a complaint to point to the failing insn
(after guest_IA has been advanced)
Update testcases .exp files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12787 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
bb4f5da48eea59c58febd68617b6886db162a3d1 23-Jul-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Pass first_ip_delta to VG_(record_depth_1_ExeContext) as the function
cannot figure it out by itself.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12775 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
ede9caf6784be2fed46d8767239c65cc7811ea47 15-Jul-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Before printing a back-trace make sure that page containing the
address stored in the stack pointer is mapped. Fixes a corner case.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12749 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
5db15403e889d4db339b342bc2a824ef0bfaa654 07-Jun-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
9fdca565049e35998c06d96ca97beb84d9c7f39d 17-Apr-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> add some .globl or used attribute to avoid link failures with gold linker + LTO

When doing experiment with gcc 4.7.0 and link time optimisation,
encountered link failures on amd64 which were solved by adding
.globl and used attribute.
=> added .globl in similar places for arm/x86/ppc32/s390.
Did not touch darwin (which asm seems somewhat different).




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12506 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
886fde3e9a960156989a1153ec03b637ab49888e 29-Mar-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix bug 297078 gdbserver signal handling problems caused by diff vki nr/gdb nr and
non reset of "C-ontinued" signal

* To allow vki signame to be used in debuglog:
- pub_core_signals.h : added prototype for Char *VG_(signame)
- m_signals.c : changed static const Char *signame(Int sigNo)
to const Char *VG_(signame)(Int sigNo)

* valgrind-low.c : when the signal to report to gdb has
been reported, clear it so that it is not reported anymore
afterwards.

* m_gdbserver.c: when checking in pass_signals if signal
can be passed without gdb interaction, do a conversion
from vki nr to gdb nr when indexing
(as pass_signals[] is indexed by gdb_nr).

* various gdbserver files:
- used vki_ prefix for some args and variables to clarify
- better debuglog tracing

* modified nlpasssigalrm.vgtest to test SIGCHLD signal
handling followed by a break (to see SIGTRAP is properly
given to gdb).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12470 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
625c3e7bf7972268d7dd7a87fce317276a53ff52 27-Mar-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fill in missing signal handling macros for amd64-darwin.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12460 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
6e9de463ef677f093e9f24f126e1b11c28cf59fd 28-Jun-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
3b290486cd4cd601b20e04340e593c9ed9717e5f 06-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
6c591e15c1d6402a2a755310f005f795b68e7e38 11-Apr-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis. Does not change any
functionality. Related to #259977.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11687 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
c7ffc94890e120c72d5802487b1092425323dc02 28-Mar-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11673 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
b5b87408c0c99f9f6938d8cd921e2a5f420577c4 07-Mar-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>). Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
fa5ce5616a17e79828fbc79f30b02b5085151e3c 24-Sep-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> On arm-linux, add r7 to the set of registers that the CFI unwinder
knows how to unwind. This is important when unwinding Thumb code
the CFA is often stated as being at some offset from r7.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11377 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
18a71e810d4c20cf08774d76bbd4e1e58ccecf14 06-Jul-2010 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Replace the handful of uses of Vg_ExtraDebugMsg and VG_(emsg) with
Vg_DebugMsg and VG_(dmsg).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11210 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
ea2d6fd6aaf98d261df9fdf580542ebf01b7fba4 01-Jul-2010 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged the MACOSX106 branch to the trunk. Merge command:

svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT. I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
ebf5844cef47b58746bafeb9d40ec5790eb2f964 01-Mar-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix out-of-date comment.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11058 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
f5f1e12bd89408917c1ffeb22ec23a1fd11b7a23 02-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Various minor fixups to make ppc32/64-linux work again following
recent ARM-Linux merge.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10992 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
67b38c3e39daca1593bf7c447ae20b0132b8ea0a 01-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> n-break build on x86-darwin following r10982.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10983 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
59570ffbe31930ab4d678754daaeec0715117a3d 01-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
b6267bd61a3802bb2a16ef993c94bf834d0e2d2e 12-Aug-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Output tweaks:
- Always print a blank line after significant messages (eg. errors). This
makes the handling of blank lines much simpler.

- Don't print full stops at the end of messages. We mostly don't do it, so
I got rid of all the remaining ones I could find for consistency.

- Use --leak-check=full rather than --leak-check=yes, for consistency with
docs and other messages.

- Update partiallydefinedeq.stderr.exp2 for older changes.

This commit only updates the code. Test updates will follow shortly. (I'm
separating them so the code changes aren't swamped by the test changes in
the SVN logs.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10783 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
738856f99eea33d86ce91dcb1d6cd5b151e307ca 15-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge coregrind/ changes from branches/MESSAGING_TIDYUP r10464.

This commit tidies up and rationalises what could be called the
"messaging" system -- that part of V to do with presenting output to
the user. In particular it brings significant improvements to XML
output.

Changes are:

* XML and normal text output now have separate file descriptors,
which solves longstanding problems for XML consumers caused by
the XML output getting polluted by unexpected non-XML output.

* This also means that we no longer have to hardwire all manner
of output settings (verbosity, etc) when XML is requested.

* The XML output format has been revised, cleaned up, and made
more suitable for use by error detecting tools in general
(various Memcheck-specific features have been removed). XML
output is enabled for Ptrcheck and Helgrind, and Memcheck is
updated to the new format.

* One side effect is that the behaviour of VG_(message) has been
made to be consistent with printf: it no longer automatically
adds a newline at the end of the output. This means multiple
calls to it can be used to build up a single line message; or a
single call can write a multi-line message. The ==pid==
preamble is automatically inserted at each newline.

* VG_(message)(Vg_UserMsg, ..args..) now has the abbreviated form
VG_(UMSG)(..args..); ditto VG_(DMSG) for Vg_DebugMsg and
VG_(EMSG) for Vg_DebugExtraMsg. A couple of other useful
printf derivatives have been added to pub_tool_libcprint.h,
most particularly VG_(vcbprintf).

* There's a small change in the core-tool interface to do with
error handling: VG_(needs_tool_errors) has a new method
void (*before_pp_Error)(Error* err) which, if non-NULL, is
called just before void (*pp_Error)(Error* err). This is to
give tools the chance to look at errors before any part of them
is printed, so they can print any XML preamble they like.

* coregrind/m_errormgr.c has been overhauled and cleaned up, and
is a bit simpler and more commented. In particular pp_Error
and VG_(maybe_record_error) are significantly changed.

The diff is huge, but mostly very boring. Most of the changes
are of the form

- VG_(message)(Vg_UserMsg, "this is a message %d", n);
+ VG_(message)(Vg_UserMsg, "this is a message %d\n", n);

Unfortunately as a result of this, it touches a large number
of source files.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10465 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
1c0ce7a9edf8772773f6216dbad4bb04317d23b6 01-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in branches/DCAS.

This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

These changes track the IR changes added by vex r1901. They primarily
update the instrumentation functions in all tools to handle the
changes, with the exception of exp-ptrcheck, which needs some further
work in order to be able to run threaded code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
f76d27a697a7b0bf3b84490baf60623fc96a23af 28-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge the DARWIN branch onto the trunk.

I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts. So instead I just took the diff between
the branch and trunk at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
c8a9107db99f81bccc000010bfd0a4c1871ec54a 20-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> DARWIN sync: spacing.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10039 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
bb5851eba5fd2684e7442242929ec72a7d90db3d 20-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> DARWIN sync: remove unused VG_UCONTEXT_SYSCALL_NUM.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10037 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
cda2f0fbda4c4b2644babc830244be8aed95de1d 18-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged non-Darwin-specific parts of r9397,r9423,r9490, 9461, 9462 from the
DARWIN branch. A big ugly DARWIN/trunk sync commit, mostly to do with
changing the representation of SysRes and vki_sigset_t. Functionality of
the trunk shouldn't be changed by it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9876 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
1ee02e331936e399e97fcddcfb5d1cde612887f6 04-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add some comments about signals, from Julian.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9764 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
2d5ff4f1dc5ea8d37eff486478945ca210e84770 04-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge part of r9709 (m_signals.c clean-ups) from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9737 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
96986055347e7d74df84091aea84d642cbe509ea 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Split up sync_sighandler into three functions, and refactor the code within
those functions a bit. The net result is that the control flow is much more
obvious now.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9702 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
c3874964570e1c32c2ba1d3d1413d8f4f3ca55ae 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't use obviously Linux-specific things unless on Linux. (Nb: This change
was committed to the DARWIN branch prematurely as part of 9698.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9699 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
492f00bd4274d5157f97554de53f9f5b6e52a8e4 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix test breakage caused by r9694.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9697 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
d6f6a4234b25c8fd68275179bac82d0a9fcacae0 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Convert more VG_(message) calls to VG_*MSG.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9694 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
26e4544a0229d7b24b583de12a5ba7c899c51980 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Converted VG_(message) calls in m_signals.c to VG_*MSG macros, for brevity.
Converted lots of tabs on modified lines to spaces as well.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9693 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
52040a4ae203256ef4a12751884b929bde3e3539 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Be safer in sanitize_si_code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9691 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
81f52d157b5ff3ea929c5ed7d274cbed4619392a 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make --trace-signals=yes output better.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9690 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
3b6b2aa75b86992e7123cf91c8bcb67784e3b100 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factor out some repeated code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9688 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
5a350bed911cc93de47e2d9c5f0ad9d15a217d23 30-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge parts of r9397 from the DARWIN branch, mostly layout cleanups, a
couple of improved debugging messages, some extra comments, some renamings,
etc. No significant functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9685 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
059539ddf7eab6928a328b017fc44acd1e1c63ce 28-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r9661 (remove m_signals.c magic numbers) from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9662 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
36fce1b6053281e00f49e10a3e6ee21b8ab909a0 28-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged r9653..r9655 (fixed terminal signal handling in Darwin) from DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9656 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
9c606bd8634cd6b67bb41fa645b5c639668cfa2d 18-Sep-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge all remaining changes from branches/PTRCHECK. These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.

The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8621 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
a8ffda6dfcbaec28d8b109b1fda290c0f14d869a 18-Jul-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Format string fixes for ppc{32,64}-aix5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8444 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
a0b6b2cf9abc7b0d87be1215a245eaccc0452af9 07-Jul-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged FORMATCHECK branch (r8368) to trunk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
8b24302b577dd0d6b57d4791d2f8f4cafbe8d19d 13-Jun-2008 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Propagate the error number in x86 signal contexts to the client.
Fixes bug #163933.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8229 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
adacaf928b87b3921af283cf9e0eca55ccaaad96 21-Dec-2007 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Propagate the ucontext information with a received signal to the
signal frame constructors and use it (on x86 and amd64) to fill in
the trap number in the signal context information.

Needed for wine which likes to look at the trap number...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7305 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
3059d27cb39d904fefde0c49ff753d71788cd2fd 21-Dec-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a new method VG_(record_depth_1_ExeContext), a trivial derivative
of VG_(record_ExeContext), which just records the first stack frame
but does not attempt to unwind the (guest) stack. This is useful in
situations where we suspect unwinding the stack might cause a
segfault.

Use this in m_signals, when getting a backtrace following a guest
segfault.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7304 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
95d86c091a218e904e912354efa4f952a9712e82 18-Dec-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Improve handling of programs which require very large main thread
stacks. Instead of hardwiring the main thread stack to a max of 16MB
and segfaulting the app beyond that point, allow the user to specify
the main stack size using the new flag --main-stacksize=<number>.

If said flag is not present, the current default, which is "MIN(16GB,
current ulimit -s value)", is used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7302 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
ec6e27cde8b45c1a1e4f52505989f717b3a4cf3c 17-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't pollute the XML output if the program terminates with a signal,
and for a couple of other minor warnings.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7176 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
6178038c23ffb8758886da3c47db7f6f1fcb110d 01-Oct-2007 dirk <dirk@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix a few format string warnings


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6928 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
8a7b41b41b46c0aa7bd4b6678b82285437e7f08c 23-Sep-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix various format string errors, courtesy of Florian Krohm.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6902 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
14c7cc5a5fbe9526329f058116f921988efe679e 25-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of the type XArrayStrings in m_clientstate and use new generic
equivalents in module m_xarray instead. A suprisingly pervasive
change.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6616 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
4278172aee9a9db96cc2f9aff9158e3164fa113c 17-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Rename VG_(get_lwp_tid) to VG_(lwpid_to_vgtid).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6409 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
ad0a3a8a33eafabba37e7f8e4dd016b06d377a5d 17-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> A naming-only change: rename VG_(set_running) to VG_(acquire_BigLock)
and VG_(set_sleeping) to VG_(release_BigLock). And some other minor
renamings to the thread locking stuff, to make it easier to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6408 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
489bfec123433aaaa024070a8a57a29e4c791807 17-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r6156:

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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
4cfea4f9480393ed6799db463b2e0fb8865a1a2f 14-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that. Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.

include/pub_tool_basics.h previously dragged in the entire kernel
interface. I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly. This is why there are many modified .c files -- they have
all acquired an extra #include line.

This certainly breaks all platforms except x86. Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
4eee476691a0648b893665d3227277eb60f30cdf 14-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Create a new module, m_vkiscnums, and move all the system call numbers
into that. Mostly this means moving vki_unistd-<plat>.h to
include/vki/vki-scnums-<plat>.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6224 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
a672ea31b733495acf8aabe18a702d53d771f80e 29-Apr-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of VG_(x86_linux_REDIR_FOR__dl_sysinfo_int80) and do the x86-linux
stack unwind kludge another way. This is believed to fix #108258.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5868 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
19df83c1ce166415a0c98e461a827ba7ac95474e 02-Apr-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of unused #define.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5810 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
86df1559d94314c7385f79ec7f80a7063cb3e1e6 07-Feb-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Synthesise and deliver SIGTRAP to clients when requested to do so by vex.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5617 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
dcb6ec87e9097098217866e17f5d2f43404748a4 19-Jan-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Deal with somewhat dubious numbers showing up from the kernel for the
r3 (syscall return) value in the ucontext for a signal interrupting a
syscall.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5554 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
0ec07f32bbbb209d749b9974408e6f025ad40b31 12-Jan-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in function wrapping support from the FNWRAP branch. That
branch hereby becomes inactive. This currently breaks everything
except x86; fixes for amd64/ppc32 to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5520 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
297c88fbff9fd02b8f8429b8b4d34cfc48f81eee 22-Dec-2005 cerion <cerion@a5019735-40e9-0310-863c-91ae7b9d1cf9> fixed up ppc64 assembly with .opd sections

do_syscall_for_client_WRK() needed a bigger stack to avoid the linkage area.

always use dot_prefix for label calls

not wrapping assembly with
.section ".text"
...
.previous
- ppc64 doesn't like it... seems we can't 'stack' more than one section to pop off with .previous ?





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5405 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
038ee9ea7b30bf3c3c3df3b466576beaf218b38c 12-Dec-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make it clearer that internal errors are Valgrind's fault.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5325 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
2c48c7b0a453d32375a4df17e153011b797ef28c 29-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add framework for ppc64 support. Apologies in advance for the
inevitable breakage to other platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5250 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
a36dcfa014bcb65633d5948db42bc533af5bb9cc 25-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> ppc32 only: use the signal context structures in a way which also
works with 2.4 kernels. Without this, signal handling and hence
threads don't really work properly on ppc32 on kernel 2.4. Add
comments from Paul M too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5232 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
39a7c1db997e3653f37258a1b313bfffbb8184ed 24-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> ppc32 only: clarify meaning of second arg of VG_(mk_SysRes_ppc32_linux)
and fix an inconsistent use of it, from m_signals.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5231 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
2fedc648b91676a18d736dcb641b6dae6ab32b7a 19-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Counterpart to r5202: restore previous assembler state with .previous


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5204 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
d9fc382d8dcfb8da3602e0feef3155e3c98deba2 19-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Hmm. Perhaps all those top-level pieces of assembly weren't such a
clever idea. There's no reason to assume the assembler is in
.text-mode when it encounters them, and as gcc 2.96 rudely
demonstrates, sometimes it isn't. So put .text in front of all of
them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5202 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
c8cb9d0a38fe7be8e2a4946c3324e2ca1e9ce25e 14-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Document sign extension of si_code by the kernel.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5123 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
95458c6ed8f85011d7b91dcf431334d51e09b0b7 13-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Preserve the sign of the bottom 16 bits of si_code when discarding
the top 16 bits - the pthread library uses negative code values in
the signals it sends between threads.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5114 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
9f4a7bf867c86415387b32ec7e3974ae6fd00350 13-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Mask out the top 16 bits of si_code at the start of the signal
handlers because the kernel sometimes forgets to do so.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5105 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
148250b9e89daa1073929da9df5fe6c8896b159c 12-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add named constants for si_code values to replace the magic numbers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5092 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
151a639d523a1d9b4cbd6629992e48ed8ee9408e 11-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix compiler warnings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5083 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
1399c74a77724d752ad94b74d7d9c8ba73e4b064 02-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix format string in signal mask printing.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4989 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
f7781e9f59fe7eacb6c7eab260266b4a044f9acc 02-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Display signal masks correctly when --trace-signals=yes is used
on 64 bit platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4988 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
cf4ac71eeefa63bb2edc6b9ed09584612a3a7db0 01-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a couple of gcc warnings following recent coredumping changes
(r4970).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4971 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
f4c231081a5c8ff6f24b3fa1980349199f1d9ea3 31-Oct-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get core dumping working again - the architecture specific code that
was in the sigframe module has been moved into the coredump module
where it belongs and things fixed up to compiler again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4970 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
74b4cca0cbe20aa94daadd8afba0ba37fbd82084 20-Oct-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove all remaining references to pointercheck. It's sad to see it
go, but realistically we can't implement it portably, at least without
considerable performance overhead and some additional complexity.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4956 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
03d8aa8639b211357b678fdedad19911ce2ebb85 14-Oct-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of various compilation warnings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4920 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
45f4e7c91119c7d01a59f5e827c67841632c9314 27-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive). That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome. The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
and include it in a couple of places. Building etc seems to still
work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
stuff was moved from -generic to -linux after the branch was created.
I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
is strange, and makes it hard to diagnose regtest failures. In
particular memcheck/tests/x86/scalar.stderr.exp remains in a
conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable. I'll
attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
67229833929d26f7a528f3560dec15d7c63eb94d 28-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
09b8480025cb3149879465b769058cb197bb9003 27-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
acaec5fd0a53ebd20fded3651169085bc7e90e78 19-Aug-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
504b72be63e93c90226cf595ec7cae1624c61789 16-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Give more info about seginfo dropping.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4425 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
50b8f770f8532c0014ba1e025eed9bff9b65308d 02-Aug-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> "Fix" (kludge) highly obscure bug in flag settings for growdown stacks
which manifested itself as unreliable behaviour with
--smc-check=stack. The accompanying comment explains.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4305 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
b9b10c72526989602c693791be4559650d0b0e4d 20-Jul-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make VG_(kill_self) use kill to send the signal, not tkill, as we are
sending it to the whole process not a single thread.

This routine is only used when we absolutely want to terminate
valgrind and as things stand it fails if called from anything other
than the initial thread as it winds up sending the signal to the main
thread only and that typically doesn't even exist any more so we
fall through and panic.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4219 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
162bebdca982f3270659209195830c0a33bfdeec 09-Jul-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add comments from PaulM.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4140 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
ce2a615a76b1ab5fe522feb980d2c825c60ff794 08-Jul-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Assertion-failure-avoiding hacks from Paul's tree. I don't know why
these are necessary, but they are.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4135 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
4a83015ecd0d962cf96f1479dc38ac41413df8df 03-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Removed the remnants of the attempt at an ARM port, because it had
bit-rotted badly and was clogging up the code.

I put the useful remnants in docs/porting-to-ARM in case anyone ever
wants to try porting to ARM again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4092 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
634a652cf631fd74fdd045da9fd303f69a0408f5 02-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove unnecesary #includes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4078 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
0087c501c6356fb083c0ea12d87263aca7abf25a 01-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move the last remaining tests out of corecheck.

Also introduced VG_(showing_core_errors)() to make core error display
more consistent.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4073 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
0ae787c314ee1ca0b8f614342bf4aea9b661e5a1 29-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove all the completely unused SF_* flags. I suspect some of the
remaining ones have no interesting effect, but I left them in.

Also simplify the signature for VG_(get_memory_from_mmap_for_client)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4045 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
b69f7c12ae343c3435b4b3bd0aa372144bdf5977 25-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved the mman VG_(*_native)() functions into m_aspacemgr, and removed
the unused init_shadow_page() function. As a result, m_aspacemgr no longer
depends on m_libcmman, breaking a circular module dependency, good!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4015 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
945ed2e53f6bbe9c84a8173b63881158132d9ca8 24-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved Robert's stack tracking code out of m_aspacemgr into a new module
m_stacks, because it's a nicely distinct and stand-alone piece of
functionality. This happily removes m_aspacemgr's dependence on
m_mallocfree (there was an apparent dependence due to the #include, even if
it didn't manifest itself in practice -- very important!) and m_options (not
so important).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4009 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
af839f52d74df156d655201a889954133ab01be7 23-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Removed the VGA_/VGO_/VGP_ prefixes for arch/OS/platform-specific
things. These made sense when the arch/OS/platform-specific code was in
one module, but as that code got mixed in with generic code the boundary
between generic and non-generic blurred, and the distinction made less
sense. So let's get rid of them.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4002 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
f845f8ffb1d2fac86714e32f4e279700b07722df 23-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Removed some repetition in the way VG_(record_fd_open)() is called.
As part of this, VG_(resolve_filename)() no longer calls VG_(malloc)()
and so m_libcfile no longer depends on m_mallocfree.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4001 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
3a088153858ca3c90c422a5626854972ea2ca296 22-Jun-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Declare my_sigreturn as static. This is correct in so much as it isn't
used anywhere else, but it does cause gcc to issue a warning because
it doesn't realised that the assembly code has defined the function.

The reason for changing it to static despite the warning is that when
it is declared extern PIE builds break on amd64 because gcc generates
code that does a load from the address of the my_sigreturn symbol to
get address of the function instead of just computing the address of
the symbol. In other words it generates this:

mov -212(%rip), %rax

to get the address of the function instead of this:

lea -212(%rip), %rax

Obviously this breaks things because we store the wrong address as
the signal restorer when installing the signal handler...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3996 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
06244e712a338c64a2842931572fc6ad274305a0 22-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move VG_(resume_scheduler) to m_signals, and make it local. Reduces
m_signals' dependence on m_scheduler.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3991 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
351d006b8fa2d3ab8cabc362954c42de19aab3c7 22-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move VKI_SIGVGKILL and VKI_SIGVGRTUSERMAX out of vki-linux.h since they're
not really from the kernel and they're defined in terms of VG_(max_signal),
which is in m_signals. Renamed them with the VG_ prefix too, since they're
now not part of the kernel interface.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3990 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
419bbcb905b239dc209da742f976f1c45abf16d0 21-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Slight reduce m_syswrap's dependence on m_signals by moving
VG_(client_signal_OK)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3982 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
899ce73b9eb1f679562e93f8e5c162aa049413f1 21-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't #include pub_core_debuginfo.h in pub_core_aspacemgr.h. So have
to #include it explicitly in lots of other places, but at least the
dependency is clear now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3974 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
85665ca6fa29dd64754dabe50eb98f25896e752a 20-Jun-2005 cerion <cerion@a5019735-40e9-0310-863c-91ae7b9d1cf9> Finally, valgrind on ppc32.
Plenty still to do, but simple programs like ls seem to run ok

Thanks, Paul, for having your ppc port of valgrind 2.4 to work from!




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3969 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
24a6efb2f94eb0cb5d53174d580e1dc00893a6d6 20-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove some unnecessary #includes, comment some others.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3966 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
75b65aa8c262221bfabb9159dddd7ad20538c459 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved VG_(start_debugger) out of m_main.c into its own module,
m_debugger. This removes the dependence of m_signals.c and m_errormgr.c
on m_main.c. It required also moving VG_(clexecfd) out of m_main.c; I put
it in m_libcproc.c which seemed like an ok-but-not-great choice.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3957 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
c7561b931e249acf3768ead77638545b0ccaa8f1 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Final commit for the initial modularisation pass:

- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
c1b0181cbd6f296401daa6ff0e6e14d3a8ab91a0 18-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Renamed the m_syscalls module m_syswrap, which better describes what it
does and better distinguishes it from m_syscall. Did everything for this
except renaming the m_syscalls/ directory -- I'll do that shortly, I don't
think Subversion can handle renaming a directory and files within that
directory at the same time.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3923 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
9abd608244d8123868d027f616fa928156615d5a 17-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved the basic syscall stuff out of m_libcbase.c into a new module
m_syscall.c. Plus some associated cleanups.

Moved VG_(sigreturn) into m_signals.c and made it local.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3922 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
f536bbbd4bf2024926574c5ed99b3e6251c6ff44 13-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Created m_machine, for various machine-related things.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3903 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
f39e9a36dca9642668a66c6b054f81c88650bcb9 12-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Finished the modularisation of vg_mylibc.c, which meant it could be removed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3894 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
e9befc6536670e4a494b7035363fc080eda98644 11-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised the libc low-level memory management stuff (mmap, etc).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3891 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
af1d7dfc9412c09d24ea10118f3fd1082f92e49d 11-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Having moved VG_(arena_strdup)() out of core.h, core.h no longer
needs to #include pub_core_mallocfree.h. As a result, we need
to #include it explicitly everywhere else.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3881 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
de62cbf607eb0e2dccb8bd6c7caf34180f528bad 11-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised signal libc stuff into m_libcsignal.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3870 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
e7aa4ae857ab875e6b673ad5a081ff6b1b697aec 09-Jun-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Clean up after m_syscalls changes: unbreak amd64-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3856 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
a8d8e239876796bc194636b8bb4b3b3c86db8528 07-Jun-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> A major overhaul of all machinery to do with syscalls, but mostly of
the m_syscalls module. Fundamentally the aim of the overhaul is to
clean up the logic and abstractions surrounding syscalls in order that
we can cleanly support ppc32 and other new targets. Aims in detail:

* To further decouple the syscall PRE/POST wrappers from specifics of
how those values are stored on a given platform. The wrappers look
the same as they did before, mostly (eg, references to ARGn and
RES are unchanged), but now those macros refer to values in structs
SyscallArgs and SyscallStatus (see priv_types_n_macros.h).

* Complete overhaul of the driver logic for syscalls. The resulting
logic is algorithmically identical to what we had before, but is
more documented, and deals with moving arg/result data between
platform specific representations and the canonical forms in
structs SyscallArgs and SyscallStatus.

* Also as a result of this change, remove problems in the old logic
due to assignments of RES in PRE wrappers trashing the ARGs whilst
we still need to see them.

* Lots of other cleanups and documentation. There is extensive
commentary in syscalls-main.c.

The driver logic has been placed in its own file, syscalls-main.c.

New/deleted files in m_syscalls:

* syscalls.c is divided up into syscalls-main.c, containing driver
logic, and syscalls-generic.c, containing generic Unix wrappers.

* priv_syscalls.h is chopped up into priv_types_n_macros.h
and priv_syscalls-{generic,main}.h.

------------

All the above changes are in m_syscalls. However there is one
system-wide change as a result of all this.

The x86-linux assumption that syscall return values in the range -4095
.. -1 are errors and all others are values, has been done away with
everywhere. Instead there is a new basic type SysRes which holds a
system call result in a platform-neutral way.

Everywhere that previously an Int would have held a system call
result, there is now a SysRes in its place.

------------

Almost everything works on SuSE 9.1 (LinuxThreads) again. NPTL will
still be majorly broken; I will commit fixes shortly. AMD64 is also
totalled. I will get to that too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3849 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
0140af5b913b1a57b5c28ef776bbb2dda23e8b64 04-Jun-2005 rjwalsh <rjwalsh@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement stack registration client requests. See the documentation
in the user manual for usage information. The stack_changes.c file in
corecheck/tests contains a short example.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3846 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
132bfccd21960e462352175f8553a5bdce8a210c 04-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised assertions and panics in m_libcassert.

As part of this, killed the VG_STRINGIFY macro, which was used to expand
out names like "VG_(foo)" and "vgPlain_foo" in assertion failure
messages. This is good since we actually want the "VG_(foo)" form used
in these messages.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3842 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
36a20fa5f779a0a6fb7b4a90dcaa6376481f1faa 03-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularise printing functions in m_libcprint.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3840 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
13bfd85dfab2cd301c92e308b274ebd17de830d2 02-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Rename *ROUND* as VG_*ROUND* to be consistent with everything else. Also
make them tool-visible, so that Memcheck and Helgrind don't have to defined
their own versions!



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3839 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
97405b2d134b52880d6dbec3eb2929e2002c2542 02-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Started modularising vg_mylibc. Put all the standalone stuff -- ie. not
relying on any other modules -- in m_libcbase.

Also converted the 'size' parameters to functions like VG_(memcpy) and
VG_(strncpy) from Int to SizeT, as they should be.

Also removed VG_(atoll16) and VG_(toupper), which weren't being used.

Also made VG_(atoll36) less flexible -- it now only does base-36 numbers
instead of any base in the range 2..36, since base-36 is the only one we
need. As part of that, I fixed a horrible bug in it which caused it to
return incorrect answers for any number containing the digits 'A'..'I'!
(Eg. for "A; it would return 17 instead of 10!)

Had to disable the assertions in VG_(string_match), since this module can't
see vg_assert, which wasn't ideal but also isn't a disaster.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3838 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
ed6b8243c731bef929b62ca4364da77ec56df900 01-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Whitespace/comment-only changes, to serve as placeholder for the last commit
which I put the wrong log message in for. The log message should have been:

Clean up VG_(core_panic_at)() -- pass it ip/sp/fp rather than a
StackTrace. This allows m_signals.c to not have to know about
m_stacktrace.c, nor does core.h need to import pub_core_stacktrace.h any
more. (Also fixed a bug that was preventing vg_assert2's extra string
from being printed.)

Also moved VG_DEEPEST_BACKTRACE out of core.h into pub_core_execontext.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3832 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
db13c4f2c66a35bf260c51ce76924a15004b37d3 01-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised vg_signals.c as m_signals.c.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3831 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c
0c24647c0e69c8da8e7683ae9e75526c5d7185a5 31-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised vg_signals.c as m_signals.c.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3820 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_signals.c