patches/strace/4.5.17/110-dont-use-REG_SYSCALL-for-sh.patch
author Johannes Stezenbach <js@sig21.net>
Tue Oct 30 00:22:25 2012 +0000 (2012-10-30)
changeset 3097 5c67476c7342
parent 747 d3e603e7c17c
permissions -rw-r--r--
scripts/functions: fix endless loop in debug-shell with IO redirection

CT_DEBUG_INTERACTIVE is disabled when stdin, stdout or
stderr are redirected, but the check is only done at
the start of the build and doesn't catch when individual
build commands use redirection. When stdin is redirected
it will cause the debug shell to exit immediately, causing
and endless loop. Thus, save the stdin/our/err file handles
and restore them before invoking the debug shell.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121030102225.GA8303@sig21.net>
Patchwork-Id: 195409
yann@974
     1
Original patch from gentoo: ../../dev/crosstool-NG/ct-ng.trunk/patches/strace/4.5.17/110-dont-use-REG_SYSCALL-for-sh.patch
yann@974
     2
-= BEGIN original header =-
yann@428
     3
diff -dur strace-4.5.16.orig/process.c strace-4.5.16/process.c
yann@974
     4
-= END original header =-
yann@974
     5
diff -durN strace-4.5.17.orig/process.c strace-4.5.17/process.c
yann@974
     6
--- strace-4.5.17.orig/process.c	2008-07-18 04:16:47.000000000 +0200
yann@974
     7
+++ strace-4.5.17/process.c	2008-10-24 21:30:13.000000000 +0200
yann@974
     8
@@ -2726,7 +2726,6 @@
yann@428
     9
        { 4*REG_GBR,            "4*REG_GBR"                             },
yann@428
    10
        { 4*REG_MACH,           "4*REG_MACH"                            },
yann@428
    11
        { 4*REG_MACL,           "4*REG_MACL"                            },
yann@428
    12
-       { 4*REG_SYSCALL,        "4*REG_SYSCALL"                         },
yann@428
    13
        { 4*REG_FPUL,           "4*REG_FPUL"                            },
yann@428
    14
        { 4*REG_FPREG0,         "4*REG_FPREG0"                          },
yann@428
    15
        { 4*(REG_FPREG0+1),     "4*REG_FPREG1"                          },