config/libc/uClibc.in.2
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
parent 2039 c5a2e4ee7fb8
child 3276 22239d19ad65
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)
     1 # uClibc second-part option
     2 
     3 if THREADS_LINUXTHREADS
     4 
     5 choice
     6     bool
     7     prompt "Linuxthread implementation: "
     8     default LIBC_UCLIBC_LNXTHRD_OLD
     9 
    10 config LIBC_UCLIBC_LNXTHRD_OLD
    11     bool
    12     prompt "old/stable"
    13     help
    14       From the uClibc config option help:
    15         There are two versions of linuxthreads.  The older (stable) version
    16         has been in uClibc for quite a long time but hasn't seen too many
    17         updates other than bugfixes.
    18 
    19 config LIBC_UCLIBC_LNXTHRD_NEW
    20     bool
    21     prompt "new"
    22     help
    23       From the uClibc config option help:
    24         The new version has not been tested much, and lacks ports for arches
    25         which glibc does not support (like bfin/frv/etc...), but is based on
    26         the latest code from glibc, so it may be the only choice for the
    27         newer ports (like alpha/amd64/64bit arches and hppa).
    28 
    29 endchoice
    30 
    31 endif # THREADS_LINUXTHREADS
    32 
    33 config LIBC_UCLIBC_LNXTHRD
    34     string
    35     default ""      if THREADS_NONE
    36     default ""      if THREADS_NPTL
    37     default "old"   if LIBC_UCLIBC_LNXTHRD_OLD
    38     default "new"   if LIBC_UCLIBC_LNXTHRD_NEW
    39 
    40 config LIBC_UCLIBC_LOCALES
    41     bool
    42     select LIBC_UCLIBC_WCHAR
    43     prompt "Add support for locales"
    44     help
    45       Say y if you want uClibc to support localisation.
    46 
    47       Note that seems to be broken on recent uClibc releases.
    48 
    49 config LIBC_UCLIBC_LOCALES_PREGEN_DATA
    50     bool
    51     prompt "Use pregen locales"
    52     depends on LIBC_UCLIBC_LOCALES
    53     default y
    54     help
    55       If you see issues with using pre-generated locales data,
    56       you can try switching this off.
    57 
    58       If so, please report the issue, so we can default this
    59       to off if too many people complain.
    60 
    61 config LIBC_UCLIBC_WCHAR
    62     bool
    63     prompt "Add support for WCHAR"
    64     help
    65       Say y if you want uClibc to support WCHAR.
    66 
    67       Maybe this is needed, if you're building a C++-Compiler