Using gdb to get a backtrace of a failing application
This document (7001690) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Desktop (SLED), Server (SLES), or openSUSE
Situation
Resolution
You can run the application directly with gdb or you can attach to an already running process. To run directly do the following:
gdb <command>
Then start the application when at the "gdb>" prompt by running:
gdb> run
To attach to an already running process do the following:
ps aux | grep <app-name>
(get the PID)
gdb –pid=<PID>
gdb> continue
When the failure occurs enable logging and get the backtrace by doing the following:
set logging file backtrace.txt
set logging on
thread apply all bt full
set logging off
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7001690
- Creation Date: 21-Oct-2008
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Desktop
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com