mirror of https://github.com/Icinga/icinga2.git
parent
fcf2f0ef5d
commit
5e06ad015a
|
@ -114,8 +114,9 @@ the duplicate import in your `~/.gdbinit` file.
|
||||||
### <a id="development-debug-gdb-run"></a> GDB Run
|
### <a id="development-debug-gdb-run"></a> GDB Run
|
||||||
|
|
||||||
Call GDB with the binary and all arguments and run it in foreground.
|
Call GDB with the binary and all arguments and run it in foreground.
|
||||||
|
If VFork causes trouble disable it inside the gdb run.
|
||||||
|
|
||||||
# gdb --args /usr/sbin/icinga2 daemon -x debug
|
# gdb --args /usr/sbin/icinga2 daemon -x debug -DUseVfork=0
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
>
|
>
|
||||||
|
@ -134,6 +135,14 @@ Continue after breakpoint.
|
||||||
|
|
||||||
(gdb) c
|
(gdb) c
|
||||||
|
|
||||||
|
### <a id="development-debug-gdb-coredump"></a> GDB Core Dump
|
||||||
|
|
||||||
|
Either attach to the running process using `gdb -p PID` or start
|
||||||
|
a new gdb run.
|
||||||
|
|
||||||
|
(gdb) r
|
||||||
|
(gdb) generate-core-file
|
||||||
|
|
||||||
### <a id="development-debug-gdb-backtrace"></a> GDB Backtrace
|
### <a id="development-debug-gdb-backtrace"></a> GDB Backtrace
|
||||||
|
|
||||||
If Icinga 2 aborted its operation abnormally, generate a backtrace.
|
If Icinga 2 aborted its operation abnormally, generate a backtrace.
|
||||||
|
@ -141,11 +150,13 @@ If Icinga 2 aborted its operation abnormally, generate a backtrace.
|
||||||
(gdb) bt
|
(gdb) bt
|
||||||
(gdb) bt full
|
(gdb) bt full
|
||||||
|
|
||||||
>**Tip**
|
Generate a full backtrace for all threads and store it into a new file
|
||||||
>
|
(e.g. for debugging dead locks):
|
||||||
> If you're opening an issue at [https://dev.icinga.org] make sure
|
|
||||||
> to attach as much detail as possible.
|
|
||||||
|
|
||||||
|
# gdb -p PID -batch -ex "thread apply all bt full" -ex "detach" -ex "q" > gdb_bt.log
|
||||||
|
|
||||||
|
If you're opening an issue at [https://dev.icinga.org] make sure
|
||||||
|
to attach as much detail as possible.
|
||||||
|
|
||||||
### <a id="development-debug-gdb-backtrace-stepping"></a> GDB Backtrace Stepping
|
### <a id="development-debug-gdb-backtrace-stepping"></a> GDB Backtrace Stepping
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue