patches/uClibc/0.9.32/140-ARM-reorder-Use-BX-option.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 13 23:32:39 2011 +0100 (2011-12-13)
changeset 2807 4193d6e6a174
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>
yann@2518
     1
commit d64b91a6d4fa1a3ac1d01fa7593d67c5e5ed5101
yann@2518
     2
Author: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
yann@2518
     3
Date:   Sun Jan 9 01:45:04 2011 +0100
yann@2518
     4
yann@2518
     5
    ARM: reorder "Use BX" option
yann@2518
     6
    
yann@2518
     7
    "Use BX" is not available on all CPUs, so the option depends on
yann@2518
     8
    a correct CPU to be chosen . It is weird that e BX" then appears
yann@2518
     9
    _above_ the CPU selection, not below.
yann@2518
    10
    
yann@2518
    11
    Move the "Use BX" after the CPU selection.
yann@2518
    12
    
yann@2518
    13
    Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@2518
    14
    Cc: Khem Raj <raj.khem@gmail.com>
yann@2518
    15
    Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
yann@2518
    16
    Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
yann@2518
    17
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
yann@2518
    18
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
yann@2518
    19
yann@2518
    20
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
yann@2518
    21
index eb27a33..dd63b80 100644
yann@2518
    22
--- a/extra/Configs/Config.arm
yann@2518
    23
+++ b/extra/Configs/Config.arm
yann@2518
    24
@@ -30,13 +30,6 @@ config CONFIG_ARM_EABI
yann@2518
    25
 
yann@2518
    26
 endchoice
yann@2518
    27
 
yann@2518
    28
-config USE_BX
yann@2518
    29
-	bool "Use BX in function return"
yann@2518
    30
-	default y
yann@2518
    31
-	depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
yann@2518
    32
-	help
yann@2518
    33
-	  Use BX instruction for THUMB aware architectures.
yann@2518
    34
-
yann@2518
    35
 choice
yann@2518
    36
 	prompt "Target Processor Type"
yann@2518
    37
 	default CONFIG_GENERIC_ARM
yann@2518
    38
@@ -131,3 +124,10 @@ config CONFIG_ARM_IWMMXT
yann@2518
    39
 	select ARCH_HAS_MMU
yann@2518
    40
 
yann@2518
    41
 endchoice
yann@2518
    42
+
yann@2518
    43
+config USE_BX
yann@2518
    44
+	bool "Use BX in function return"
yann@2518
    45
+	default y
yann@2518
    46
+	depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
yann@2518
    47
+	help
yann@2518
    48
+	  Use BX instruction for THUMB aware architectures.