Bug 338681 Enable clone backtrace hack for i386-linux in helgrind.
glibc doesn't provide CFI unwind information right after the clone call
(because it would be invalid in the child). Enable the same workaround
for i386-linux that is already used for amd64-linux (subtract 3 from ip).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14398 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/NEWS b/NEWS
index f864b79..1448f5e 100644
--- a/NEWS
+++ b/NEWS
@@ -238,6 +238,7 @@
338445 amd64 vbit-test fails with unknown opcodes used by arm64 VEX
338499 --sim-hints parsing broken due to wrong order in tokens
338615 suppress glibc 2.20 optimized strcmp implementation for ARMv7
+338681 Unable to unwind through clone thread created on i386-linux
n-i-bz Fix KVM_CREATE_IRQCHIP ioctl handling
n-i-bz s390x: Fix memory corruption for multithreaded applications
n-i-bz vex arm->IR: allow PC as basereg in some LDRD cases
diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c
index 58ae2d6..d2261e2 100644
--- a/helgrind/hg_main.c
+++ b/helgrind/hg_main.c
@@ -1568,7 +1568,7 @@
/* Record where the parent is so we can later refer to this in
error messages.
- On amd64-linux, this entails a nasty glibc-2.5 specific hack.
+ On x86/amd64-linux, this entails a nasty glibc specific hack.
The stack snapshot is taken immediately after the parent has
returned from its sys_clone call. Unfortunately there is no
unwind info for the insn following "syscall" - reading the
@@ -1577,7 +1577,7 @@
is unwind info. Sigh.
*/
{ Word first_ip_delta = 0;
-# if defined(VGP_amd64_linux)
+# if defined(VGP_amd64_linux) || defined(VGP_x86_linux)
first_ip_delta = -3;
# elif defined(VGP_arm64_linux)
first_ip_delta = -1;