Skip to Main Content
The Art of Debugging with GDB, DDD, and Eclipse
book

The Art of Debugging with GDB, DDD, and Eclipse

by Norman Matloff, Peter Jay Salzman
September 2008
Intermediate to advanced content levelIntermediate to advanced
280 pages
6h 31m
English
No Starch Press
Content preview from The Art of Debugging with GDB, DDD, and Eclipse

Use of Startup Files

As mentioned earlier, it is usually a good idea to not exit GDB while you recompile your code. This way your breakpoints and various other actions you set up (for example, display commands, to be discussed in Chapter 3) are retained. If you were to exit GDB, you would have to type these all over again.

However, you may need to exit GDB before you are finished debugging. If you are quitting for a break or for the day, and you cannot stay logged in to the computer, you'll need to exit GDB. In order to not lose them, you can put your commands for breakpoints and other settings in a GDB startup file, and then they will be loaded automatically every time you start up GDB.

GDB's startup files are named .gdbinit by default. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning x64 Assembly Programming: From Novice to AVX Professional

Beginning x64 Assembly Programming: From Novice to AVX Professional

Jo Van Hoey
Command-Line Rust

Command-Line Rust

Ken Youens-Clark
Modern CMake for C++

Modern CMake for C++

Rafał Świdziński

Publisher Resources

ISBN: 9781593271749Errata Page