patches/uClibc/0.9.30.2/250-libc-Fix-typo-in-include-rpc.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 13 23:32:39 2011 +0100 (2011-12-13)
branch1.13
changeset 2847 c0bf2319af08
permissions -rw-r--r--
scripts: fix dumping execution backtrace

Dumping the backtrace has been broken since changeset #652e56d6d35a:
scripts: execute each steps in a subshell

We can spawn sub-sub-shells in some cases.

The way the fault handler works is to dump the backtrace, but to avoid
printing it once for every sub-shell (which could get quite confusing),
it simply exits when it detects that it is being run in a sub-shell,
leaving to the top-level shell the work to dump the backtrace.

Because each step is executed in its own sub-shell, the variable arrays
that contain the step name, the source file and line number, are lost
when exiting the per-step sub-shell.

Hence, the backtrace is currently limited to printing only the top-level
main procedure of the shell.

Fix this thus:
- when dumping the bckatraces for the steps & the functions, remember
it was dumped, and only dump it if it was not already dumped
- at the top-level shell, print the hints

Also, rename the top-level step label.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 4193d6e6a17430a177fa88c287879c2c35e319f3)
yann@1819
     1
From b4d6a6e94d87ff2b4ae687a21048833f19b9dd48 Mon Sep 17 00:00:00 2001
yann@1819
     2
From: Carmelo Amoroso <carmelo.amoroso@st.com>
yann@1819
     3
Date: Mon, 8 Feb 2010 16:24:06 +0100
yann@1819
     4
Subject: [PATCH 11/15] libc: Fix typo in include/rpc
yann@1819
     5
yann@1819
     6
s/GNU_SOUCE/GNU_SOURCE/ in include/rcp/
yann@1819
     7
yann@1819
     8
Signed-off-by: Jason Woodward <jason.woodward@timesys.com>
yann@1819
     9
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
yann@1819
    10
---
yann@1819
    11
 include/rpc/auth.h  |    4 ++--
yann@1819
    12
 include/rpc/rpc.h   |    4 ++--
yann@1819
    13
 include/rpc/types.h |    4 ++--
yann@1819
    14
 3 files changed, 6 insertions(+), 6 deletions(-)
yann@1819
    15
yann@1819
    16
diff --git a/include/rpc/auth.h b/include/rpc/auth.h
yann@1819
    17
index 17eb59f..12297e6 100644
yann@1819
    18
--- a/include/rpc/auth.h
yann@1819
    19
+++ b/include/rpc/auth.h
yann@1819
    20
@@ -47,8 +47,8 @@
yann@1819
    21
 #ifndef __FORCE_GLIBC
yann@1819
    22
 #define __FORCE_GLIBC
yann@1819
    23
 #endif
yann@1819
    24
-#ifndef _GNU_SOUCE
yann@1819
    25
-#define _GNU_SOUCE
yann@1819
    26
+#ifndef _GNU_SOURCE
yann@1819
    27
+#define _GNU_SOURCE
yann@1819
    28
 #endif
yann@1819
    29
 #define _(X)	X
yann@1819
    30
 #endif
yann@1819
    31
diff --git a/include/rpc/rpc.h b/include/rpc/rpc.h
yann@1819
    32
index 8194ffe..219910e 100644
yann@1819
    33
--- a/include/rpc/rpc.h
yann@1819
    34
+++ b/include/rpc/rpc.h
yann@1819
    35
@@ -44,8 +44,8 @@
yann@1819
    36
 #ifndef __FORCE_GLIBC
yann@1819
    37
 #define __FORCE_GLIBC
yann@1819
    38
 #endif
yann@1819
    39
-#ifndef _GNU_SOUCE
yann@1819
    40
-#define _GNU_SOUCE
yann@1819
    41
+#ifndef _GNU_SOURCE
yann@1819
    42
+#define _GNU_SOURCE
yann@1819
    43
 #endif
yann@1819
    44
 #define _(X)	X
yann@1819
    45
 #include <features.h>
yann@1819
    46
diff --git a/include/rpc/types.h b/include/rpc/types.h
yann@1819
    47
index 469576e..05f49c3 100644
yann@1819
    48
--- a/include/rpc/types.h
yann@1819
    49
+++ b/include/rpc/types.h
yann@1819
    50
@@ -39,8 +39,8 @@
yann@1819
    51
 #ifndef __FORCE_GLIBC
yann@1819
    52
 #define __FORCE_GLIBC
yann@1819
    53
 #endif
yann@1819
    54
-#ifndef _GNU_SOUCE
yann@1819
    55
-#define _GNU_SOUCE
yann@1819
    56
+#ifndef _GNU_SOURCE
yann@1819
    57
+#define _GNU_SOURCE
yann@1819
    58
 #endif
yann@1819
    59
 #define _(X)	X
yann@1819
    60
 #endif
yann@1819
    61
-- 
yann@1819
    62
1.6.6.1
yann@1819
    63