config/companion_libs.in
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 2381 0ca0f85a4b2a
child 3216 bfad02f03c75
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 # Companion libraries config options
     2 # Those libraries are required for different versions of gcc,
     3 # and can be used by binutils and gdb (maybe others as well).
     4 
     5 menu "Companion libraries"
     6 
     7 config COMPLIBS_NEEDED
     8     bool
     9 
    10 config GMP_NEEDED
    11     bool
    12     select GMP
    13     select COMPLIBS_NEEDED
    14 
    15 config MPFR_NEEDED
    16     bool
    17     select MPFR
    18     select COMPLIBS_NEEDED
    19 
    20 config PPL_NEEDED
    21     bool
    22     select PPL
    23     select COMPLIBS_NEEDED
    24 
    25 config CLOOG_NEEDED
    26     bool
    27     select CLOOG
    28     select COMPLIBS_NEEDED
    29 
    30 config MPC_NEEDED
    31     bool
    32     select MPC
    33     select COMPLIBS_NEEDED
    34 
    35 config LIBELF_NEEDED
    36     bool
    37     select LIBELF
    38     select COMPLIBS_NEEDED
    39 
    40 config COMPLIBS
    41     bool
    42 
    43 config GMP
    44     bool
    45     select COMPLIBS
    46 
    47 config MPFR
    48     bool
    49     select GMP
    50     select COMPLIBS
    51 
    52 config PPL
    53     bool
    54     select GMP
    55     select COMPLIBS
    56 
    57 config CLOOG
    58     bool
    59     select GMP
    60     select PPL
    61     select COMPLIBS
    62 
    63 config MPC
    64     bool
    65     select GMP
    66     select MPFR
    67     select COMPLIBS
    68 
    69 config LIBELF
    70     bool
    71     select COMPLIBS
    72 
    73 config LIBELF_TARGET
    74     bool
    75 
    76 if GMP
    77 source "config/companion_libs/gmp.in"
    78 endif
    79 if MPFR
    80 source "config/companion_libs/mpfr.in"
    81 endif
    82 if PPL
    83 source "config/companion_libs/ppl.in"
    84 endif
    85 if CLOOG
    86 source "config/companion_libs/cloog.in"
    87 endif
    88 if MPC
    89 source "config/companion_libs/mpc.in"
    90 endif
    91 if LIBELF || LIBELF_TARGET
    92 comment "libelf version needed to build for target"
    93     depends on !LIBELF
    94 source "config/companion_libs/libelf.in"
    95 endif
    96 
    97 config FOO
    98     bool
    99 
   100 if COMPLIBS
   101 
   102 comment "Companion libraries common options"
   103 
   104 config COMPLIBS_CHECK
   105     bool
   106     prompt "Check the companion libraries builds (!!! READ HELP!!!)"
   107     help
   108       It is highly recommended to check the newly built companion libraries.
   109       Unfortunately, this is a very intensive task, and takes a loooong time.
   110       
   111       Checking the newly built companion libraries is thus disabled by default,
   112       but it is suggested that you check them at least once on your machine,
   113       and if they work, disable the check on subsequent builds.
   114       
   115       If you suspect that one (or more) of your companion libraries is the
   116       cause for incorrectly generated code, you should answer 'Y' here.
   117       Note however that this will take a really long time. For example,
   118       building PPL on my machine takes roughly 1'40", while checking it takes
   119       about 1h40'...
   120 
   121 endif # COMPLIBS
   122 
   123 endmenu