[Top] | [Contents] | [Index] | [ ?] |
Summary of GDB
Free Software
Free Software Needs Free Documentation
Contributors to GDB
1. A Sample GDB Session
2. Getting In and Out of GDB
2.1 Invoking GDB
2.1.1 Choosing Files
2.1.2 Choosing Modes
2.1.3 What GDB Does During Startup
2.2 Quitting GDB
2.3 Shell Commands
2.4 Logging Output
3. GDB Commands
3.1 Command Syntax
3.2 Command Completion
3.3 Getting Help
4. Running Programs Under GDB
4.1 Compiling for Debugging
4.2 Starting your Program
4.3 Your Program's Arguments
4.4 Your Program's Environment
4.5 Your Program's Working Directory
4.6 Your Program's Input and Output
4.7 Debugging an Already-running Process
4.8 Killing the Child Process
4.9 Debugging Programs with Multiple Threads
4.10 Debugging Programs with Multiple Processes
4.11 Setting a Bookmark to Return to Later
4.11.1 A Non-obvious Benefit of Using Checkpoints
5. Stopping and Continuing
5.1 Breakpoints, Watchpoints, and Catchpoints
5.1.1 Setting Breakpoints
5.1.2 Setting Watchpoints
5.1.3 Setting Catchpoints
5.1.4 Deleting Breakpoints
5.1.5 Disabling Breakpoints
5.1.6 Break Conditions
5.1.7 Breakpoint Command Lists
5.1.8 Breakpoint Menus
5.1.9 "Cannot insert breakpoints"
5.1.10 "Breakpoint address adjusted..."
5.2 Continuing and Stepping
5.3 Signals
5.4 Stopping and Starting Multi-thread Programs
6. Examining the Stack
6.1 Stack Frames
6.2 Backtraces
6.3 Selecting a Frame
6.4 Information About a Frame
7. Examining Source Files
7.1 Printing Source Lines
7.2 Specifying a Location
7.3 Editing Source Files
7.3.1 Choosing your Editor
7.4 Searching Source Files
7.5 Specifying Source Directories
7.6 Source and Machine Code
8. Examining Data
8.1 Expressions
8.2 Program Variables
8.3 Artificial Arrays
8.4 Output Formats
8.5 Examining Memory
8.6 Automatic Display
8.7 Print Settings
8.8 Value History
8.9 Convenience Variables
8.10 Registers
8.11 Floating Point Hardware
8.12 Vector Unit
8.13 Operating System Auxiliary Information
8.14 Memory Region Attributes
8.14.1 Attributes
8.14.1.1 Memory Access Mode
8.14.1.2 Memory Access Size
8.14.1.3 Data Cache
8.14.2 Memory Access Checking
8.15 Copy Between Memory and a File
8.16 How to Produce a Core File from Your Program
8.17 Character Sets
8.18 Caching Data of Remote Targets
9. C Preprocessor Macros
10. Tracepoints
10.1 Commands to Set Tracepoints
10.1.1 Create and Delete Tracepoints
10.1.2 Enable and Disable Tracepoints
10.1.3 Tracepoint Passcounts
10.1.4 Tracepoint Action Lists
10.1.5 Listing Tracepoints
10.1.6 Starting and Stopping Trace Experiments
10.2 Using the Collected Data
10.2.1 tfind n
10.2.2 tdump
10.2.3 save-tracepoints filename
10.3 Convenience Variables for Tracepoints
11. Debugging Programs That Use Overlays
11.1 How Overlays Work
11.2 Overlay Commands
11.3 Automatic Overlay Debugging
11.4 Overlay Sample Program
12. Using GDB with Different Languages
12.1 Switching Between Source Languages
12.1.1 List of Filename Extensions and Languages
12.1.2 Setting the Working Language
12.1.3 Having GDB Infer the Source Language
12.2 Displaying the Language
12.3 Type and Range Checking
12.3.1 An Overview of Type Checking
12.3.2 An Overview of Range Checking
12.4 Supported Languages
12.4.1 C and C++
12.4.1.1 C and C++ Operators
12.4.1.2 C and C++ Constants
12.4.1.3 C++ Expressions
12.4.1.4 C and C++ Defaults
12.4.1.5 C and C++ Type and Range Checks
12.4.1.6 GDB and C
12.4.1.7 GDB Features for C++
12.4.1.8 Decimal Floating Point format
12.4.2 Objective-C
12.4.2.1 Method Names in Commands
12.4.2.2 The Print Command With Objective-C
12.4.3 Fortran
12.4.3.1 Fortran Operators and Expressions
12.4.3.2 Fortran Defaults
12.4.3.3 Special Fortran Commands
12.4.4 Pascal
12.4.5 Modula-2
12.4.5.1 Operators
12.4.5.2 Built-in Functions and Procedures
12.4.5.3 Constants
12.4.5.4 Modula-2 Types
12.4.5.5 Modula-2 Defaults
12.4.5.6 Deviations from Standard Modula-2
12.4.5.7 Modula-2 Type and Range Checks
12.4.5.8 The Scope Operators ::
and .
12.4.5.9 GDB and Modula-2
12.4.6 Ada
12.4.6.1 Introduction
12.4.6.2 Omissions from Ada
12.4.6.3 Additions to Ada
12.4.6.4 Stopping at the Very Beginning
12.4.6.5 Known Peculiarities of Ada Mode
12.5 Unsupported Languages
13. Examining the Symbol Table
14. Altering Execution
14.1 Assignment to Variables
14.2 Continuing at a Different Address
14.3 Giving your Program a Signal
14.4 Returning from a Function
14.5 Calling Program Functions
14.6 Patching Programs
15. GDB Files
15.1 Commands to Specify Files
15.2 Debugging Information in Separate Files
15.3 Errors Reading Symbol Files
16. Specifying a Debugging Target
16.1 Active Targets
16.2 Commands for Managing Targets
16.3 Choosing Target Byte Order
17. Debugging Remote Programs
17.1 Connecting to a Remote Target
17.2 Sending files to a remote system
17.3 Using the gdbserver
Program
17.3.1 Running gdbserver
17.3.1.1 Attaching to a Running Program
17.3.1.2 Multi-Process Mode for gdbserver
17.3.1.3 Other Command-Line Arguments for gdbserver
17.3.2 Connecting to gdbserver
17.3.3 Monitor Commands for gdbserver
17.4 Remote Configuration
17.5 Implementing a Remote Stub
17.5.1 What the Stub Can Do for You
17.5.2 What You Must Do for the Stub
17.5.3 Putting it All Together
18. Configuration-Specific Information
18.1 Native
18.1.1 HP-UX
18.1.2 BSD libkvm Interface
18.1.3 SVR4 Process Information
18.1.4 Features for Debugging DJGPP Programs
18.1.5 Features for Debugging MS Windows PE Executables
18.1.5.1 Support for DLLs without Debugging Symbols
18.1.5.2 DLL Name Prefixes
18.1.5.3 Working with Minimal Symbols
18.1.6 Commands Specific to GNU Hurd Systems
18.1.7 QNX Neutrino
18.2 Embedded Operating Systems
18.2.1 Using GDB with VxWorks
18.2.1.1 Connecting to VxWorks
18.2.1.2 VxWorks Download
18.2.1.3 Running Tasks
18.3 Embedded Processors
18.3.1 ARM
18.3.2 Renesas M32R/D and M32R/SDI
18.3.3 M68k
18.3.4 MIPS Embedded
18.3.5 OpenRISC 1000
18.3.6 PowerPC Embedded
18.3.7 HP PA Embedded
18.3.8 Tsqware Sparclet
18.3.8.1 Setting File to Debug
18.3.8.2 Connecting to Sparclet
18.3.8.3 Sparclet Download
18.3.8.4 Running and Debugging
18.3.9 Fujitsu Sparclite
18.3.10 Zilog Z8000
18.3.11 Atmel AVR
18.3.12 CRIS
18.3.13 Renesas Super-H
18.4 Architectures
18.4.1 x86 Architecture-specific Issues
18.4.2 A29K
18.4.3 Alpha
18.4.4 MIPS
18.4.5 HPPA
18.4.6 Cell Broadband Engine SPU architecture
18.4.7 PowerPC
19. Controlling GDB
19.1 Prompt
19.2 Command Editing
19.3 Command History
19.4 Screen Size
19.5 Numbers
19.6 Configuring the Current ABI
19.7 Optional Warnings and Messages
19.8 Optional Messages about Internal Happenings
20. Canned Sequences of Commands
20.1 User-defined Commands
20.2 User-defined Command Hooks
20.3 Command Files
20.4 Commands for Controlled Output
21. Command Interpreters
22. GDB Text User Interface
22.1 TUI Overview
22.2 TUI Key Bindings
22.3 TUI Single Key Mode
22.4 TUI-specific Commands
22.5 TUI Configuration Variables
23. Using GDB under GNU Emacs
24. The GDB/MI Interface
Function and Purpose
Notation and Terminology
24.1 GDB/MI Command Syntax
24.1.1 GDB/MI Input Syntax
24.1.2 GDB/MI Output Syntax
24.2 GDB/MI Compatibility with CLI
24.3 GDB/MI Development and Front Ends
24.4 GDB/MI Output Records
24.4.1 GDB/MI Result Records
24.4.2 GDB/MI Stream Records
24.4.3 GDB/MI Out-of-band Records
24.5 Simple Examples of GDB/MI Interaction
24.6 GDB/MI Command Description Format
24.7 GDB/MI Breakpoint Commands
24.8 GDB/MI Program Context
24.9 GDB/MI Thread Commands
24.10 GDB/MI Program Execution
24.11 GDB/MI Stack Manipulation Commands
24.12 GDB/MI Variable Objects
24.13 GDB/MI Data Manipulation
24.14 GDB/MI Tracepoint Commands
24.15 GDB/MI Symbol Query Commands
24.16 GDB/MI File Commands
24.17 GDB/MI Target Manipulation Commands
24.18 GDB/MI File Transfer Commands
24.19 Miscellaneous GDB/MI Commands
25. GDB Annotations
25.1 What is an Annotation?
25.2 The Server Prefix
25.3 Annotation for GDB Input
25.4 Errors
25.5 Invalidation Notices
25.6 Running the Program
25.7 Displaying Source
26. Reporting Bugs in GDB
26.1 Have You Found a Bug?
26.2 How to Report Bugs
27. Command Line Editing
27.1 Introduction to Line Editing
27.2 Readline Interaction
27.2.1 Readline Bare Essentials
27.2.2 Readline Movement Commands
27.2.3 Readline Killing Commands
27.2.4 Readline Arguments
27.2.5 Searching for Commands in the History
27.3 Readline Init File
27.3.1 Readline Init File Syntax
27.3.2 Conditional Init Constructs
27.3.3 Sample Init File
27.4 Bindable Readline Commands
27.4.1 Commands For Moving
27.4.2 Commands For Manipulating The History
27.4.3 Commands For Changing Text
27.4.4 Killing And Yanking
27.4.5 Specifying Numeric Arguments
27.4.6 Letting Readline Type For You
27.4.7 Keyboard Macros
27.4.8 Some Miscellaneous Commands
27.5 Readline vi Mode
28. Using History Interactively
28.1 History Expansion
28.1.1 Event Designators
28.1.2 Word Designators
28.1.3 Modifiers
A. Formatting Documentation
B. Installing GDB
B.1 Requirements for Building GDB
B.2 Invoking the GDB `configure' Script
B.3 Compiling GDB in Another Directory
B.4 Specifying Names for Hosts and Targets
B.5 `configure' Options
C. Maintenance Commands
D. GDB Remote Serial Protocol
D.1 Overview
D.2 Packets
D.3 Stop Reply Packets
D.4 General Query Packets
D.5 Register Packet Format
D.6 Tracepoint Packets
D.7 Host I/O Packets
D.8 Interrupts
D.9 Examples
D.10 File-I/O Remote Protocol Extension
D.10.1 File-I/O Overview
D.10.2 Protocol Basics
D.10.3 The F
Request Packet
D.10.4 The F
Reply Packet
D.10.5 The `Ctrl-C' Message
D.10.6 Console I/O
D.10.7 List of Supported Calls
open
close
read
write
lseek
rename
unlink
stat/fstat
gettimeofday
isatty
system
D.10.8 Protocol-specific Representation of Datatypes
Integral Datatypes
Pointer Values
Memory Transfer
struct stat
struct timeval
D.10.9 Constants
Open Flags
mode_t Values
Errno Values
Lseek Flags
Limits
D.10.10 File-I/O Examples
D.11 Library List Format
D.12 Memory Map Format
E. The GDB Agent Expression Mechanism
E.1 General Bytecode Design
E.2 Bytecode Descriptions
E.3 Using Agent Expressions
E.4 Varying Target Capabilities
E.5 Tracing on Symmetrix
E.6 Rationale
F. Target Descriptions
F.1 Retrieving Descriptions
F.2 Target Description Format
F.2.1 Inclusion
F.2.2 Architecture
F.2.3 Features
F.2.4 Types
F.2.5 Registers
F.3 Predefined Target Types
F.4 Standard Target Features
F.4.1 ARM Features
F.4.2 MIPS Features
F.4.3 M68K Features
F.4.4 PowerPC Features
G. GNU GENERAL PUBLIC LICENSE
Preamble
How to Apply These Terms to Your New Programs
H. GNU Free Documentation License
H.1 ADDENDUM: How to use this License for your documents
Index
Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.
These pages are maintained by the GDB developers.
Copyright Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
This document was generated by GDB Administrator on March, 27 2008 using texi2html