From be882756bf74d95ddf5e34497add7e18afd83b1f Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Sat, 10 May 2014 19:28:59 +0200 Subject: [PATCH] Documentation: Add development section. Fixes #6184 --- doc/8-development.md | 91 ++++++++++++++++++++++++++++ doc/{8-appendix.md => 9-appendix.md} | 0 2 files changed, 91 insertions(+) create mode 100644 doc/8-development.md rename doc/{8-appendix.md => 9-appendix.md} (100%) diff --git a/doc/8-development.md b/doc/8-development.md new file mode 100644 index 000000000..9fa74f995 --- /dev/null +++ b/doc/8-development.md @@ -0,0 +1,91 @@ +# Icinga 2 Development + +You can follow Icinga 2's development closely by checking +out these resources: + +* Development Bug Tracker: [https://dev.icinga.org/projects/i2?jump=issues] ([How to report a bug](http://www.icinga.org/faq/how-to-report-a-bug/)) +* Git Repositories: [https://git.icinga.org/?p=icinga2.git;a=summary] (mirror at [https://github.com/Icinga/icinga2]) +* Git Checkins Mailinglist: [https://lists.icinga.org/mailman/listinfo/icinga-checkins] +* Development Mailinglist: [https://lists.icinga.org/mailman/listinfo/icinga-devel] +* #icinga-devel on irc.freenode.net [http://webchat.freenode.net/?channels=icinga-devel] including a Git Commit Bot + +For general support questions, please refer to [https://www.icinga.org/support/]. + + +## Debug Icinga 2 + +Make sure that the debug symbols are available for Icinga 2. +The Icinga 2 packages provide a debug package which must be +installed seperately for all involved binaries, like `icinga2-bin` +or `icinga2-ido-mysql`. + + # yum install icinga2-bin-debuginfo icinga2-ido-mysql-debuginfo + +Compiled binaries require the `-DCMAKE_BUILD_TYPE=RelWithDebInfo` or +`-DCMAKE_BUILD_TYPE=Debug` cmake build flags. + +### GDB + +Call GDB with the binary and all arguments and run it in foreground. + + # gdb --args /usr/sbin/icinga2 -c /etc/icinga2/icinga2.conf -x + +### GDB Run + +Run the application. + + (gdb) r + +Kill the running application. + + (gdb) k + +Continue after breakpoint. + + (gdb) c + +### GDB Backtrace + +If Icinga 2 aborted its operation abnormally, generate a backtrace. + + (gdb) bt + (gdb) bt full + +>**Tip** +> +> If you're opening an issue at [https://dev.icinga.org] make sure +> to attach as much details as possible. + + +### GDB Backtrace Stepping + +Identifying the problem may require stepping into the backtrace analysing +the current scope, attributes and possible unmet requirements. `p` prints +the value of the selected variable or function call result, if applicable. + + (gdb) up + (gdb) down + (gdb) p checkable + (gdb) p checkable-GetName() + + +### GDB Breakpoints + +Set a breakpoint to a specific function call, or file specific line. + + (gdb) b checkable.cpp:125 + (gdb) b icinga::Checkable::SetEnablePerfdata + +GDB will ask about loading the required symbols later, select `yes` instead +of `no`. + +Then run Icinga 2 until it reaches the first breakpoint. Continue with `c` +afterwards. + + (gdb) run + (gdb) c + +If you want to delete all breakpoints, use `d` and select `yes`. + + (gdb) d + diff --git a/doc/8-appendix.md b/doc/9-appendix.md similarity index 100% rename from doc/8-appendix.md rename to doc/9-appendix.md -- 2.40.0