History log of /external/valgrind/coregrind/m_libcassert.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
026fe8634d7a56b101bb8e43a6666b2f0d00d38d 14-May-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add the lwpid in the scheduler status information
E.g. we now have:
Thread 1: status = VgTs_Runnable (lwpid 15782)
==15782== at 0x8048EB5: main (sleepers.c:188)
client stack range: [0xBE836000 0xBE839FFF] client SP: 0xBE838F80
valgrind stack top usage: 10264 of 1048576

Thread 2: status = VgTs_WaitSys (lwpid 15828)
==15782== at 0x2E9451: ??? (syscall-template.S:82)
==15782== by 0x8048AD3: sleeper_or_burner (sleepers.c:84)
==15782== by 0x39B924: start_thread (pthread_create.c:297)
==15782== by 0x2F107D: clone (clone.S:130)
client stack range: [0x442F000 0x4E2EFFF] client SP: 0x4E2E338
valgrind stack top usage: 2288 of 1048576

This allows to attach with GDB to the good lwpid in case
you want to examine the valgrind state rather than the guest state.

(it is needed to attach to the specific lwpid as valgrind is not
linked with lib pthread, so GDB cannot discover the threads
of the process).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15231 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.c
62cee7a76f79da8ffd0c3d018e18699147391249 15-Apr-2015 zliu <zliu@a5019735-40e9-0310-863c-91ae7b9d1cf9> Address minor issues in Julian's last review.
For TILEGX only.
By: Zhi-Gang Liu


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15094 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.c
d0720e4a624bdfe7ce2494d690e7a88f986b93c1 12-Mar-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement command line option --valgrind-stacksize=<number>

This allows to decrease memory usage when using many threads,
if no big stacksize is needed by Valgrind.
If needed (e.g. for demangling big c++ symbols), the V stacksize
can be increased.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15004 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
d474ab25fa26da6adf1f1fd4199379887eb377f6 11-Feb-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> arm32-linux: GET_STARTREGS has always been wrong on this target,
confusing SP and LR and resulting in no backtraces during internal
assertion failures etc on this platform. Fixes #343219. Noticed by
dimitry@google.com.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14928 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
518850bf0da07ed3e2244e307268ae0fd80e93a8 23-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Constify coregrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14656 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
74054f4eac95d1ff81274b9d08be662494210134 28-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r14125 from the BUF_REMOVAL branch to trunk.
This change eliminates the fixed size buffer in VG_(assert_fail).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14588 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
38a74d2cc4670e3eb559adff51a376cd6ec98005 30-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> The semantic of the stack bounds is not consistent or is not described.
At various places, there were either some assumption that the 'end'
boundary (highest address) was either not included, included,
or was the highest addressable word, or the highest addressable byte.
This e.g. was very visible when doing:
./vg-in-place -d -d ./helgrind/tests/tc01_simple_race|&grep regi
giving
--24040:2:stacks register 0xBEDB4000-0xBEDB4FFF as stack 0
--24040:2:stacks register 0x402C000-0x4A2C000 as stack 1
showing that the main stack end was (on x86) not the highest word
but the highest byte, while for the thread 1, the registered end
was a byte not part of the stack.

The attached patch ensures that stack bounds semantic are documented and
consistent. Also, some of the stack handling code is factorised.

The convention that the patch ensures and documents is:
start is the lowest addressable byte, end is the highest addressable byte.
(the words 'min' and 'max' have been kept when already used, as this wording is
consistent with the new semantic of start/end).

In various debug log, used brackets [ and ] to make clear that
both bounds are included.

The code to guess and register the client stack was duplicated
in all the platform specific syswrap-<plat>-<os>.c files.
Code has been factorised in syswrap-generic.c

The patch has been regression tested on
x86, amd64, ppc32/64, s390x.
It has been compiled and one test run on arm64.
Not compiled/not tested on darwin, android, mips32/64, arm


More in details, the patch does the following:

coregrind/pub_core_aspacemgr.h
include/valgrind.h
include/pub_tool_machine.h
coregrind/pub_core_scheduler.h
coregrind/pub_core_stacks.h
- document start/end semantic in various functions
also in pub_tool_machine.h:
- replaces unclear 'bottommost address' by 'lowest address'
(unclear as stack bottom is or at least can be interpreted as
the 'functional' bottom of the stack, which is the highest
address for 'stack growing downwards').
coregrind/pub_core_initimg.h
replace unclear clstack_top by clstack_end
coregrind/m_main.c
updated to clstack_end

coregrind/pub_core_threadstate.h
renamed client_stack_highest_word to client_stack_highest_byte
coregrind/m_scheduler/scheduler.c
computes client_stack_highest_byte as the highest addressable byte
Update comments in call to VG_(show_sched_status)
coregrind/m_machine.c
coregrind/m_stacktrace.c
updated to client_stack_highest_byte, and switched
stack_lowest/highest_word to stack_lowest/highest_byte accordingly

coregrind/m_stacks.c
clarify semantic of start/end,
added a comment to indicate why we invert start/end in register call
(note that the code find_stack_by_addr was already assuming that
end was included as the checks were doing e.g.
sp >= i->start && sp <= i->end

coregrind/pub_core_clientstate.h
coregrind/m_clientstate.c
renames Addr VG_(clstk_base) to Addr VG_(clstk_start_base)
(start to indicate it is the lowest address, base suffix kept
to indicate it is the initial lowest address).

coregrind/m_initimg/initimg-darwin.c
updated to VG_(clstk_start_base)
replace unclear iicii.clstack_top by iicii.clstack_end
updated clstack_max_size computation according to both bounds included.

coregrind/m_initimg/initimg-linux.c
updated to VG_(clstk_start_base)
updated VG_(clstk_end) computation according to both bounds included.
replace unclear iicii.clstack_top by iicii.clstack_end

coregrind/pub_core_aspacemgr.h
extern Addr VG_(am_startup) : clarify semantic of the returned value
coregrind/m_aspacemgr/aspacemgr-linux.c
removed a copy of a comment that was already in pub_core_aspacemgr.h
(avoid double maintenance)
renamed unclear suggested_clstack_top to suggested_clstack_end
(note that here, it looks like suggested_clstack_top was already
the last addressable byte)

* factorisation of the stack guessing and registration causes
mechanical changes in the following files:
coregrind/m_syswrap/syswrap-ppc64-linux.c
coregrind/m_syswrap/syswrap-x86-darwin.c
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-arm-linux.c
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-mips64-linux.c
coregrind/m_syswrap/syswrap-ppc32-linux.c
coregrind/m_syswrap/syswrap-amd64-darwin.c
coregrind/m_syswrap/syswrap-mips32-linux.c
coregrind/m_syswrap/priv_syswrap-generic.h
coregrind/m_syswrap/syswrap-x86-linux.c
coregrind/m_syswrap/syswrap-s390x-linux.c
coregrind/m_syswrap/syswrap-darwin.c
coregrind/m_syswrap/syswrap-arm64-linux.c
Some files to look at more in details:
syswrap-darwin.c : the handling of sysctl(kern.usrstack) looked
buggy to me, and has probably be made correct by the fact that
VG_(clstk_end) is now the last addressable byte. However,unsure
about this, as I could not find any documentation about
sysctl(kern.usrstack). I only find several occurences on the web,
showing that the result of this is page aligned, which I guess
means it must be 1+ the last addressable byte.
syswrap-x86-darwin.c and syswrap-amd64-darwin.c
I suspect the code that was computing client_stack_highest_word
was wrong, and the patch makes it correct.
syswrap-mips64-linux.c
not sure what to do for this code. This is the only code
that was guessing the stack differently from others.
Kept (almost) untouched. To be discussed with mips maintainers.

coregrind/pub_core_libcassert.h
coregrind/m_libcassert.c
* void VG_(show_sched_status):
renamed Bool valgrind_stack_usage to Bool stack_usage
if stack_usage, shows both the valgrind stack usage and
the client stack boundaries
coregrind/m_scheduler/scheduler.c
coregrind/m_gdbserver/server.c
coregrind/m_gdbserver/remote-utils.c
Updated comments in callers to VG_(show_sched_status)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14392 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.c
421c26e30de64ccf441ec398c1f8beda7afbb47c 24-Jul-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factor out VG_(exit_now) to contain the syscall incantation to terminate
the process. Make ML_(am_exit) and VG_(exit) use it, thereby avoiding
double maintenance.
Introduce libcbase_assert macro and use it in VG_(strncpy_safely) to
document the case that function cannot handle.
Add stub functions to memcheck/tests/unit_libcbase.c to satisfy new
dependencies.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14185 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
180a7500bf2464d5b16cddb5618b91fb3f095998 20-Apr-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> - The option "--vgdb-stop-at=event1,event2,..." allows the user
to ask GDB server to stop before program execution, at the end
of the program execution and on Valgrind internal errors.

- A new monitor command "v.set hostvisibility" that allows GDB server
to provide access to Valgrind internal host status/memory.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13900 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
4f6f336badda2171d6e842cca3de63b53f4c9f0b 19-Apr-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Several improvements to (internal) statistics reporting about memory usage,
making it easier to understand the memory and/or oom situation.
No functional (user level) change.

* For --profile-heap=yes, sort the cost centers by decreasing size,
so that the most relevant cost centers are closed to the arena
total.

* factorise duplicated code calling a series of print stat functions

* VG_(show_sched_status)
optionally show the host stacktrace
the amount of valgrind stack used by each thread
the exited threads

* various functions: update to add VG_(show_sched_status) new
args, keeping the same info production as before.

* In case of out of memory situation detected by m_mallocfree.c,
reports more information:
valgrind and tool stats
scheduler status (full information)

* gdbserver v.info scheduler :
show full information.

The oom behaviour/reporting was tested using a small
program causing an OOM, and having several threads
(some terminated, some still active).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13897 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.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_libcassert.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_libcassert.c
5869dedfc08dd385b3672b51becbb713f5c8931a 29-Jan-2013 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a buffer overflow in VG_(assert_fail).
Patch by Matthias Schwarzott (zzam@gentoo.org) with some minor mods.
Fixes BZ 313811


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13274 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
dbb3584f591710a15a437918c0fc27e300993566 27-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> More Char/HChar fixes and constification.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13088 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
bbd9a21ca8518fc34cd7b6254a61d72f82495120 14-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Char/ HChar cleanup: The various panic and printf-like functions
all take const HChar * arguments.
__FILE__ and __func__ expand into string literals (or character
arrays initialised by them), as do strings created by the preprocessor
e.g. #stuff.
This change reduces the number of warnings from 17000+ to ~5500


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13039 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.c
4eeb0e50fd10c08a396c6d3c53f296287a47d9c3 10-Jun-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Avoid recursion in VG_(exit).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10285 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.c
5b6b8faafbfa52635d444dd58b107d3a4081c86c 19-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Tweak VG_(exit).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9951 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
5f5ef2ae9e7c2ce5ebc36c1e2fc98e5f81650be3 11-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factor out the name of the libpthread library. Also fix a minor stack trace
bogon.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9832 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
b8329f0ce649067dc5d9d74f8392c6a0ab8d2d40 16-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Made the Valgrind abort/crash message clearer about the fact that it can be
caused by heap corruption by the client. Also clarified the FAQ about this.

Also updated the FAQ about decoding failures a little.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9556 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
70ecd6b5b70d11104cc130eff7b3344df83aff3d 15-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Avoid non-local asm labels. Fixes bug #189054.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9539 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
6f74a7ef1768dd3925cc22869b4e5e24e9338d08 12-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added some shortcuts for VG_(message)(), and used them in a few places (but
certainly not all).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9367 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.c
b8b79addf04dd5d0b558916e26df0b1927cbd758 03-Mar-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in the DATASYMS branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.c
745fc459ce4ce9264d8844bf1ab695d235a4ce01 17-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r6159 (parts of):

Minor build-system adjustments, mostly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6289 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.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_libcassert.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_libcassert.c
dfbaa229a894e121daa6bd143742222c2b3b68e9 18-Jan-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make VG_(get_StackTrace2) aware of bogus LR values in
replacement/wrapper functions on ppc64-linux, which otherwise mess up
the backtraces.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5549 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.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_libcassert.c
f349d55d40891b890d0da268cfb9f092af0fc8f4 14-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> In XML mode, emit a closing </valgrindoutput> on various kinds of
failures, so as to help parsers stop parsing:

- after any kind of assertion failure or panic
- if suppression file is missing or has a syntax error



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5130 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
de616ecfbd2bf40a3410c091340f735d54d70263 05-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix stack unwinding on ppc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5022 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
9a699e85987a49a179aeef839767e3752b09c8d0 05-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Commit Tom's improved-stack-unwinding patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5021 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.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_libcassert.c
49b45ba90382fd313e40555559f5f5aaa23033b4 20-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Reinstate stack trace printing on assertion failures. It's terrible
for the module dependency graph, but it's very useful.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4205 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
9450d245afa7cd6e49f2734c2a621047df0d01ec 26-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> While we're not printing stacktraces from assertion failures, might
as well disable pp_sched_status() -- which produces traces that are less
useful than the main one that has been disabled -- and break the
circular dependence between m_libcassert and m_threadstate.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4036 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
01515882f4672b5a5be0bebc9e18cd240a65ae4d 25-Jun-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Do not print backtraces in assertion failures. This is an as-yet
unsuccessful attempt to remove m_libcassert from the huge cycle which
most of the modules currently live in.

VG_(get_StackTrace2) can now be privatised, but I haven't done so yet.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4018 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
aba25b4ebd14dad1e5ce9ac6bc4f646e581e87e4 21-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> wibble


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3984 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.c
e070c20d9f3e651f478bba6bdb6fc34aa1f9514d 21-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Tweak comments and remove an unnecessary #include.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3972 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.c
3161e808ce76595c60447d041715a3ece1f9665d 20-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use BACKTRACE_DEPTH consistently.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3967 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.c
394213a582d2c388eea41c142b4455fb8c2c48a4 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move VG_(bbs_done) out of main and make it local in scheduler.c. This
removes the dependence of m_translate.c and m_libcassert.c on m_main.c.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcassert.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_libcassert.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_libcassert.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_libcassert.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_libcassert.c