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
diff --git a/include/pub_tool_machine.h b/include/pub_tool_machine.h
index 127b6a9..1b24f0f 100644
--- a/include/pub_tool_machine.h
+++ b/include/pub_tool_machine.h
@@ -53,6 +53,7 @@
 extern Addr VG_(get_SP) ( ThreadId tid );
 extern Addr VG_(get_IP) ( ThreadId tid );
 extern Addr VG_(get_FP) ( ThreadId tid );
+extern Addr VG_(get_LR) ( ThreadId tid );
 
 extern void VG_(set_SP) ( ThreadId tid, Addr sp );
 extern void VG_(set_IP) ( ThreadId tid, Addr ip );