gdb backtrace, core dump and git patches

1. Applying a patch to a git checkout
If you are not familiar with git:
-download patch
-git clean -xdf
-git am <path_to_patch>

That's it.

2. Making a backtrace from a core dump
The best way, how to obtain backtrace is from core dump file.

Core file is not generated by default. You can allow it with command:

sh4.2# ulimit -c unlimited
//then you have to run sssd from the same terminal, debug level is optional in
//this case
sh4.2# sssd -i -d7
//perform action to reproduce bug (segfault)
//New file(core) should be created in current directory
//It is very likely, that core will be generated from sssd_be (I guess)
//You can check it by calling command
sh4.2# file ./core
//you can see similar output from file command
//./core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'xterm'
//run gdb
sh4.2# gdb <name_of_segfaulted_proces> ./core
(gdb) bt full

In this example, the name_of_segfaulted-process was sssd_be
Here is an example session:

steve@pinoso:~$ sudo file ./core
./core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV),
SVR4-style, from '/usr/local/libexec/sssd/sssd_be --domain default -d

steve@pinoso:~$ sudo gdb /usr/local/libexec/sssd/sssd_be ./core
GNU gdb (GDB)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Para las instrucciones de informe de errores, vea:
Leyendo símbolos desde /usr/local/libexec/sssd/sssd_be...hecho.
[Nuevo LWP 27356]

The back trace follows. Don't to forget to press return when prompted until you get back to the gdb prompe