background preloader

Gdb

Facebook Twitter

Debugging with GDB: Debugging with GDB. This file documents the gnu debugger gdb . This is the Tenth Edition, of Debugging with gdb : the gnu Source-Level Debugger for gdb (GDB) Version 7.4.50.20120611. Copyright © 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 2011, 2012 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being “Free Software” and “Free Software Needs Free Documentation”, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below.

(a) The FSF's Back-Cover Text is: “You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.” Debugging with gdb This file describes gdb , the gnu symbolic debugger. Free Software. Exterminate Bugs Faster with GDB. You’ve used GDB, but are you really getting the most from it? These advanced GDB tips will help you debug to your full potential. If you’ve developed code for any length of time, chances are that you have a” favorite” bug. Maybe it was that hard-to-find bug lurking in seemingly perfect code. Or perhaps it was that pesky little error buried within fifteen layers of function calls.

Or perhaps it was the most dreadful kind of bug, the intermittent crash, that only occurred when Jupiter and Saturn were aligned just so– you earned your Jolt that day! Whatever the bug, you no doubt reached for the GNU Project Debugger (GDB) to track the bugaboo down. In this article, let’s open the throttle a little and look at some GDB features that can help you squash bugs faster. Without a doubt, one of the most common GDB commands you’ll use is backtrace. backtrace outputs your program’s current call stack and shows information about each stack frame.