docs/7 - Contributing to crosstool-NG.txt
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 2563 e17f35b05539
child 2908 dcdb309b7967
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@2076
     1
File.........: 7 - Contributing to crosstool-NG.txt
antony@2563
     2
Copyright....: (C) 2010 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
yann@2076
     3
License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5
yann@2076
     4
yann@2076
     5
yann@2076
     6
Contributing to crosstool-NG  /
yann@2076
     7
_____________________________/
yann@2076
     8
yann@2076
     9
yann@2076
    10
Sending a bug report |
yann@2076
    11
---------------------+
yann@2076
    12
yann@2076
    13
If you need to send a bug report, please send a mail with subject
yann@2076
    14
prefixed with "[CT_NG]" with to following destinations:
yann@2076
    15
    TO: yann.morin.1998 (at) anciens.enib.fr
yann@2076
    16
    CC: crossgcc (at) sourceware.org
yann@2076
    17
yann@2076
    18
yann@2076
    19
Sending patches |
yann@2076
    20
----------------+
yann@2076
    21
yann@2076
    22
If you want to enhance crosstool-NG, there's a to-do list in the TODO file.
yann@2076
    23
michael@2700
    24
When updating a package, please include the category and component in the
michael@2700
    25
start of the description. For example:
michael@2700
    26
    cc/gcc: update to the Linaro 2011.09 release
michael@2700
    27
michael@2700
    28
Here is the (mostly-complete) list of categories and components:
michael@2700
    29
michael@2700
    30
    Categories  | Components
michael@2700
    31
    ------------+-------------------------------------------------------
michael@2700
    32
    arch        | alpha, arm, mips, powerpc...
michael@2700
    33
    cc          | gcc
michael@2700
    34
    binutils    | binutils, elf2flt, sstrip
michael@2700
    35
    libc        | eglibc, uClibc, glibc, newlib, mingw, none
michael@2700
    36
    kernel      | linux, mingw32, bare-metal
michael@2700
    37
    debug       | dmalloc, duma, gdb, ltrace, strace
michael@2700
    38
    complibs    | gmp, mpfr, ppl, cloog, mpc, libelf
michael@2700
    39
    comptools   | make, m4, autoconf, automake, libtool
michael@2700
    40
    ------------+-------------------------------------------------------
michael@2700
    41
                | The following categories have no component-part:
michael@2700
    42
    samples     | when adding/updating/removing a sample
michael@2700
    43
    kconfig     | for stuff in the kconfig/ dir
michael@2700
    44
    docs        | for changes to the documentation
michael@2700
    45
    configure   | for changes to ./configure and/or Makefile.in
michael@2700
    46
    config      | for stuff in config/ not covered above
michael@2700
    47
    scripts     | for stuff in scripts/ not covered above
michael@2700
    48
michael@2700
    49
yann@2076
    50
Patches should come with the appropriate SoB line. A SoB line is typically
yann@2076
    51
something like:
yann@2076
    52
   Signed-off-by: John DOE <john.doe@somewhere.net>
yann@2076
    53
yann@2076
    54
The SoB line is clearly described in Documentation/SubmittingPatches , section
yann@2076
    55
12, of your favourite Linux kernel source tree.
yann@2076
    56
michael@2700
    57
Add the following to your ~/.hgrc to make Mercurial check for the SoB
michael@2700
    58
line when committing:
michael@2700
    59
    [hooks]
michael@2700
    60
    pretxncommit.signoff = hg log --template '{desc}\n' -r $HG_NODE \
michael@2700
    61
        | grep -qi '^signed-off-by:'
michael@2700
    62
michael@2700
    63
You can also add any of the following lines if applicable:
michael@2700
    64
    Acked-by:
michael@2700
    65
    Tested-by:
michael@2700
    66
    Reviewed-by:
yann@2076
    67
yann@2076
    68
For larger or more frequent contributions, mercurial should be used.
yann@2077
    69
There is a nice, complete and step-by-step tutorial in section 'C'.