Skip to Content
Sun and Oracle
Channel Sun
How to Buy
Log In
简体中文
docs.sun.com 主页
>
Sun Studio 12 Collection
> Sun Studio 12: Debugging a Program With dbx
Sun Studio 12: Debugging a Program With dbx
只搜寻这本书
搜索帮助
查看这本书:
其他语言
日本語
简体中文
包含在
Sun Studio 12 Collection
查找更多文档
浏览文档标题
浏览产品文档
专项支持资源
Sun 培训课程
BigAdmin 系统管理门户
Sun 支持中心
Sun Solve
以 PDF 格式下载本书 (2099 KB)
Sun Studio 12: Debugging a Program With dbx
Index
Numbers and Symbols
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Book Information
Preface
Who Should Use This Book
Typographic Conventions
Shell Prompts in Command Examples
Supported Platforms
Accessing Sun Studio Documentation
Accessing Related Solaris Documentation
Resources for Developers
Contacting Technical Support
Sun Welcomes Your Comments
1. Getting Started With dbx
Compiling Your Code for Debugging
Starting dbx and Loading Your Program
Running Your Program in dbx
Debugging Your Program With dbx
Quitting dbx
Accessing dbx Online Help
2. Starting dbx
Starting a Debugging Session
Debugging a Core File
Using the Process ID
The dbx Startup Sequence
Setting Startup Properties
Compiling a Program for Debugging
Debugging Optimized Code
Quitting Debugging
Saving and Restoring a Debugging Run
3. Customizing dbx
Using the dbx Initialization File
Setting dbx Environment Variables
The dbx Environment Variables and the Korn Shell
4. Viewing and Navigating To Code
Navigating To Code
Types of Program Locations
Program Scope
Qualifying Symbols With Scope Resolution Operators
Locating Symbols
Viewing Variables, Members, Types, and Classes
Debugging Information in Object Files and Executables
Finding Source and Object Files
5. Controlling Program Execution
Running a Program
Attaching dbx to a Running Process
Detaching dbx From a Process
Stepping Through a Program
Using Ctrl+C to Stop a Process
6. Setting Breakpoints and Traces
Setting Breakpoints
Setting Filters on Breakpoints
Tracing Execution
Setting a when Breakpoint at a Line
Setting a Breakpoint in a Shared Library
Listing and Clearing Breakpoints
Enabling and Disabling Breakpoints
Efficiency Considerations
7. Using the Call Stack
Finding Your Place on the Stack
Walking the Stack and Returning Home
Moving Up and Down the Stack
Popping the Call Stack
Hiding Stack Frames
Displaying and Reading a Stack Trace
8. Evaluating and Displaying Data
Evaluating Variables and Expressions
Assigning a Value to a Variable
Evaluating Arrays
9. Using Runtime Checking
Capabilities of Runtime Checking
Using Runtime Checking
Using Access Checking
Using Memory Leak Checking
Using Memory Use Checking
Suppressing Errors
Using Runtime Checking on a Child Process
Using Runtime Checking on an Attached Process
Using Fix and Continue With Runtime Checking
Runtime Checking Application Programming Interface
Using Runtime Checking in Batch Mode
Troubleshooting Tips
Runtime Checking Limitations
Runtime Checking Errors
10. Fixing and Continuing
Using Fix and Continue
Fixing Your Program
To Fix Your File
Continuing After Fixing
Changing Variables After Fixing
Modifying a Header File
Fixing C++ Template Definitions
11. Debugging Multithreaded Applications
Understanding Multithreaded Debugging
Understanding Thread Creation Activity
Understanding LWP Information
12. Debugging Child Processes
Attaching to Child Processes
Following the exec Function
Following the fork Function
Interacting With Events
13. Debugging OpenMP Programs
How Compilers Transform OpenMP Code
dbx Functionality Available for OpenMP Code
Using Stack Traces With OpenMP Code
Using the dump Command on OpenMP Code
Execution Sequence of OpenMP Code
14. Working With Signals
Understanding Signal Events
Catching Signals
Sending a Signal to a Program
Automatically Handling Signals
15. Debugging C++ With dbx
Using dbx With C++
Exception Handling in dbx
Debugging With C++ Templates
16. Debugging Fortran Using dbx
Debugging Fortran
Debugging Segmentation Faults
Locating Exceptions
Tracing Calls
Working With Arrays
Showing Intrinsic Functions
Showing Complex Expressions
Showing Interval Expressions
Showing Logical Operators
Viewing Fortran 95 Derived Types
Pointer to Fortran 95 Derived Type
17. Debugging a Java Application With dbx
Using dbx With Java Code
Environment Variables for Java Debugging
Starting to Debug a Java Application
Customizing Startup of the JVM Software
dbx Modes for Debugging Java Code
Using dbx Commands in Java Mode
18. Debugging at the Machine-Instruction Level
Examining the Contents of Memory
Stepping and Tracing at Machine-Instruction Level
Setting Breakpoints at the Machine-Instruction Level
Using the regs Command
19. Using dbx With the Korn Shell
ksh-88 Features Not Implemented
Extensions to ksh-88
Renamed Commands
Rebinding of Editing Functions
20. Debugging Shared Libraries
Dynamic Linker
Fix and Continue
Setting Breakpoints in Shared Libraries
Setting a Breakpoint in an Explicitly Loaded Library
A. Modifying a Program State
Impacts of Running a Program Under dbx
Commands That Alter the State of the Program
B. Event Management
Event Handlers
Event Safety
Creating Event Handlers
Manipulating Event Handlers
Using Event Counters
Setting Event Specifications
Event Specification Modifiers
Parsing and Ambiguity
Using Predefined Variables
Setting Event Handler Examples
C. Command Reference
assign Command
attach Command
bsearch Command
call Command
cancel Command
catch Command
check Command
clear Command
collector Command
cont Command
dalias Command
dbx Command
dbxenv Command
debug Command
delete Command
detach Command
dis Command
display Command
down Command
dump Command
edit Command
examine Command
exception Command
exists Command
file Command
files Command
fix Command
fixed Command
fortran_modules Command
frame Command
func Command
funcs Command
gdb Command
handler Command
hide Command
ignore Command
import Command
intercept Command
java Command
jclasses Command
joff Command
jon Command
jpkgs Command
kill Command
language Command
line Command
list Command
listi Command
loadobject Command
lwp Command
lwps Command
mmapfile Command
module Command
modules Command
native Command
next Command
nexti Command
pathmap Command
pop Command
print Command
proc Command
prog Command
quit Command
regs Command
replay Command
rerun Command
restore Command
rprint Command
rtc showmap Command
rtc skippatch Command
run Command
runargs Command
save Command
scopes Command
search Command
showblock Command
showleaks Command
showmemuse Command
source Command
status Command
step Command
stepi Command
stop Command
stopi Command
suppress Command
sync Command
syncs Command
thread Command
threads Command
trace Command
tracei Command
uncheck Command
undisplay Command
unhide Command
unintercept Command
unsuppress Command
unwatch Command
up Command
use Command
watch Command
whatis Command
when Command
wheni Command
where Command
whereami Command
whereis Command
which Command
whocatches Command
News Center
About Sun
Contact Sun
Terms of Use
Privacy
Copyright
1994-2009
Sun Microsystems, Inc.