config/debug/duma.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 2444 896cb0d36c1a
child 3142 6569f6a9060c
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 # D.U.M.A. - Detect Unintended Memory Access - Memory checker
     2 
     3 ## depends on ! BACKEND
     4 
     5 ## help D.U.M.A. - Detect Unintended Memory Access
     6 ## help A memory bound checker, with additional features.
     7 ## help Formerly known as Electric Fence.
     8 
     9 config DUMA_A
    10     bool
    11     prompt "Build a static library"
    12     default y
    13 
    14 config DUMA_SO
    15     bool
    16     prompt "Build a shared library"
    17     default y if SHARED_LIBS
    18 
    19 choice
    20     bool
    21     prompt "D.U.M.A. version"
    22 # Don't remove next line
    23 # CT_INSERT_VERSION_BELOW
    24 
    25 config DUMA_V_2_5_15
    26     bool
    27     prompt "2_5_15"
    28 
    29 config DUMA_V_2_5_14
    30     bool
    31     prompt "2_5_14 (OBSOLETE)"
    32     depends on OBSOLETE
    33 
    34 config DUMA_V_2_5_12
    35     bool
    36     prompt "2_5_12 (OBSOLETE)"
    37     depends on OBSOLETE
    38 
    39 config DUMA_V_2_5_8
    40     bool
    41     prompt "2_5_8 (OBSOLETE)"
    42     depends on OBSOLETE
    43 
    44 config DUMA_V_2_5_1
    45     bool
    46     prompt "2_5_1 (OBSOLETE)"
    47     depends on OBSOLETE
    48 
    49 endchoice
    50 
    51 config DUMA_VERSION
    52     string
    53 # Don't remove next line
    54 # CT_INSERT_VERSION_STRING_BELOW
    55     default "2_5_15" if DUMA_V_2_5_15
    56     default "2_5_14" if DUMA_V_2_5_14
    57     default "2_5_12" if DUMA_V_2_5_12
    58     default "2_5_8" if DUMA_V_2_5_8
    59     default "2_5_1" if DUMA_V_2_5_1