Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
2Activity

Table Of Contents

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
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
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.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.1 How Overlays Work
11.2 Overlay Commands
11.3 Automatic Overlay Debugging
11.4 Overlay Sample Program
Chapter 12: Using gdb with Different Languages 119
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.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.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.3 gdb/mi Command Syntax
24.3.1 gdb/mi Input Syntax
24.3.2 gdb/mi Output Syntax
24.4 gdb/mi Compatibility with CLI
24.5 gdb/mi Development and Front Ends
24.6 gdb/mi Output Records
24.6.1 gdb/mi Result Records
24.6.2 gdb/mi Stream Records
24.6.3 gdb/mi Out-of-band Records
24.7 Simple Examples of gdb/mi Interaction
24.8 gdb/mi Command Description Format
24.9 gdb/mi Breakpoint Commands
24.10 gdb/mi Program Context
24.11 gdb/mi Thread Commands
24.12 gdb/mi Program Execution
24.13 gdb/mi Stack Manipulation Commands
24.14 gdb/mi Variable Objects
24.15 gdb/mi Data Manipulation
24.16 gdb/mi Tracepoint Commands
24.17 gdb/mi Symbol Query Commands
24.18 gdb/mi File Commands
24.19 gdb/mi Target Manipulation Commands
24.20 gdb/mi File Transfer Commands
24.21 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
Appendix A Formatting Documentation
Appendix 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
Appendix C Maintenance Commands
Appendix 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.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
Appendix 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
Preamble
How to Apply These Terms to Your New Programs
H.1 ADDENDUM: How to use this License for your documents
Index
0 of .
Results for:
No results containing your search query
P. 1
gdb

gdb

Ratings: (0)|Views: 84 |Likes:
Published by alterfritz3091

More info:

Published by: alterfritz3091 on Sep 11, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/06/2012

pdf

text

original

You're Reading a Free Preview
Pages 9 to 25 are not shown in this preview.
You're Reading a Free Preview
Pages 34 to 76 are not shown in this preview.
You're Reading a Free Preview
Pages 85 to 92 are not shown in this preview.
You're Reading a Free Preview
Pages 101 to 220 are not shown in this preview.
You're Reading a Free Preview
Pages 229 to 439 are not shown in this preview.

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->