Debugging LibreOffice with GDB
Getting started To debug LibreOffice with GDB you need to build LibreOffice with debug symbols. You can either choose to build LO with symbols for the entire project or for selected modules. For building with symbols for the entire project you can use ./autogen.sh --enable-debug For building with symbols for specific modules ./autogen.sh --enable-debug --enable-selective-debuginfo = "sc/" More information for setting up GDB can be found here How to debug . Setting up pretty printers Basics Debugging boils down to the following set of actions: Set up a break point Run the program Step through the code Analyze the variables as you go Handling Crashes while debugging The most common reasons for crashes are either an exception occurred or an assertion failures. In case of Exceptions, you can stop GDB at the point where the exception occurred by setting up a breakpoint using catch throw and then analyze the backtrace (generated using bt ).