HP HP-UX Debugging Tools User Manual

HP/DDE
HP
9000
Debugger
Series
700/800
User's
Guide
ABCDE
HP
Part No. B3476-90015
Printed in USA
First Edition
E0796
July 1996
Legal
The
information
Hew
lett-Packar
including,
tness for
errors
con
damages
material.
W
arran
t
y
Hewlett-P
lo
cal
Sales
Notices
in
d
makes
but
not
a
p
articular
tained
in
.
ack
herein
connection
A
cop
y
ard
pro
and
Service
this
limite
of
the
duct
do
cumen
no
dto,
purp
or
direct,
with
sp
and
Oce.
t
warr
anty
the implie
ose.
Hewlett-P
the
furnishing,
ecic
w
replacemen
is
sub
of
any
d
indirect,
arran
ject
to
kind
warr
anties
ac
k
sp
ecial,
p
erformance,
t
y
terms
t
parts
c
hange without
with
re
of
mer
ard
shall
not
inciden
applicable to
can
b
e
gard
to this
chantability
b
e
held
tal
or
or
use
obtained
notice.
manual,
liable
consequen
of this
your
from
and
y
our
for
tial
Cop
yrigh
This
are
reserv
permission
Restricted Righ
Go
vernmen
of
the
252.227-7013
Commercial
other
HEWLETT-PA
3000 Hano
c
t
do
cumen
ed.
is
tis
Righ
ts
agencies.
ver Street
1983-96
t
con
Repro
prohibited,
subject
in
for
tains
ts
Legend.
T
ec
DOD
Hewlett-P
information
duction,
except
to restrictions
hnical
agencies,
Computer Soft
CKARD COMP
ac
adaptation,
as
Use,
duplication
Data
and
and
ware
Restricted Righ
ANY
k
ard
Compan
whic
h
is protected
or
translation
allo
w
ed
under
or
as
set
forth
Computer Soft
subparagraphs
y
the
cop
disclosure
in
subparagraph
ware
(c)
ts
clause
b
y
cop
without
yrigh
b
y
the
clause at
(1)
and
at
F
yrigh
prior
t
la
U.S.
(c)
AR
t.
All
written
ws.
(c)
(1)
DF
ARS
(2)
of
52.227-19
Palo Alto, California 94304 U.S.A.
Use of this man
pack is restricted to this product only
be made for securit
ual and exible disk(s) or tap e cartridge(s) supplied for this
. Additional copies of the programs ma
y and bac
k-up
purposes only
. Resale of the programs in
their present form or with alterations, is expressly prohibited.
c
Copyright 1979, 1980, 1983, 1985-93 Regents of the University of California
righ
(ii)
the
ts
for
y
This soft
under
T
coun
X
license
c
Cop
yrigh
c
Cop
yright
c
Cop
yrigh
c
Cop
yrigh
c
Cop
yright
c
Cop
yrigh
c
Cop
yrigh
c
Cop
yrigh
c
Cop
yrigh
rademarks.
tries,
Windo
ware
is
based
from
t
1980,
1986-1992 Sun
t
1985-86,
t
1989-93
1986 Digital
t
1990
t
1990,
t
1989-1991
t
1988
UNIX
licensed
w
System
in
part
the
Regen
1984,
1986
1988
The
Op
Equipment
Motorola,
1991,
1992
The
Carnegie
is
a
registered
exclusiv
is
a
trademark
on
the
F
ourth
ts
of
the
Univ
No
v
ell,
Inc.
Microsystems, Inc.
Massac
en
h
Soft
usetts
w
are
Foundation,
Corp
Inc.
Cornell
Univ
Mellon
ersity
Univ
Univ
of
Maryland
ersit
trademark
ely
through
of
X/Op
the
Massac
Berk
ersit
y
of
Institute
oration.
ersit
y
y
in the
en
Compan
h
eley
Soft
w
California.
of
T
ec
hnology
Inc.
United States
y
Limited.
usetts
Institute
are
Distribution
.
of
and
Tec
other
hnology
.
OSF/Motif
and
other
\Sun"
Solaris,
NFS
Sun
and
SPAR
is
a
trademark
Microsystems,
is
coun
the
a
trademark
tries.
Sun
logo
C, and
Inc.
of
SP
of
the
are
trademarks
AR
Cstation
Sun
Microsystems,
Op
en
Soft
of
are
trademarks
w
are
F
Sun
Microsystems,
Inc.
Copyrigh
oundation, Inc.
Inc.
of
Sun
Microsystems,
c
1986,
t
in
the
SunOS,
1987,
U.S.
Inc.
1988
Printing
History
New editions
previous
supplemen
The
HP/DDE
soft
edition.
ts.
ware
at
B3476-90015
B3476-90011
B3476-90004
of
this
W
version
the
time
man
e
ma
num
w
ual
y
b
e
issued
will
issue
er
July
June
April
a
prin
incorp
tec
ted
the
man
1996
1995
1994
orate
hnical
alongside
ual.
all
material
addendum or
the
date
up
dated
since
release notes
indicates
the
as
v
ersion
V
ersion
V
ersion
V
ersion
the
of
4.0
3.2
3.0
iv
Preface
The
HP/DDE
En
vironmen
op
erating
Debugger User's
t
(HP/DDE),
system.
the
Guide
high-lev
describ
el
language
es the
HP Distributed
debugger
for
the
Debugging
HP-UX
HP/DDE
HP-UX
The
The
pro
cess
expression
is
and Solaris
debugger
main
debugger
con
trol,
ev
also
softw
aluation.
source languages,
This
man
ual
con
HP/DDE's
line-mo
OSF/Motif
de
in
terface
Note
Reference
debugging
is
a
v
a
vailable
ailable
from within
information
tasks
from
command.
the
default
systems.
are consists
pro
vides
program
and
The
managers
target mac
tains
information
user
and
the
HP/DDE
SoftBenc
that
manual.
is
h
v
diers
somewhat
The debugging
The SoftBenc
Solaris
are
the
systems.
on
a
v
ailable
Help
debugger
Manager
the debugger
SoftBenc
of
the
suc
h
basic
data
hines,
on
interface.
debugger
also
the default
ersion
h
Program
of
online
h
Program
main
debugger
debugger
monitoring,
ob
enable
ject
ho
the
le
w
to
It also
managers
SoftBenc
HP/DDE
from
the
commands
Debugger
commands
through
on
the
HP
if y
ou use
Debugger
functions
program
debugger
formats,
p
erform
con
tains
in
app
has
in
terface
and
the
HP
VUE
the
Help
whic
and
a
set
as
information,
to
and
user
debugging
information
endixes.
h
Program
a
graphical
presen
are
the
same.
runs
on
b
oth
information
Help System.
fron
t
panel.
men
u
h runs
of
managers.
program
handle
in
terfaces.
tasks
on
Debugger.
user
ted
in
HP-UX
on
p
It
or
issue
on b
con
trol,
and
dieren
using
the
in
terface
this
and
erforming
This help
is
also
the
help
oth
t
The
v
Audience
Audience
This
manual
is
written
for
programmers
in
C,
C++,
F
OR
TRAN,
or
P
ascal.
vi
Summary
of
T
ec
hnical
Changes
This
edition
of
the
HP/DDE
Distributed Debugging
w
orkstations.
HP/DDE
A
Supp
Enhanced
Supp
V
ersion
new
and
ort
of
debugging
ort
for
Allo
wing
Automatic
Allo
wing
Supp
ort
for
Supp
ort for
4.0
easier
P
to
A-RISC 2.0
ANSI
ob
ject
C++,
specic
detection
w
atc
hp
long
dynamic_cast<
pro
use
oin
long
En
of
ts
Debugger User's
vironmen
vides
the
t
follo
graphical
assembly
optimized
including:
of
on
breakp
most
t
yp
oin
o
v
reference-t
es.
typ
e
(HP/DDE)
wing
new
user
in
terface.
language.
co
de
in
C.
ts.
erloaded
yp
e
variables.
>(
expr
)
Guide
op
erators.
op
erator.
Summary
do
cuments
V
ersion
features
of
T
echnical
4.0
on
and
enhancemen
the
HP
HP-UX
Changes
ts:
Supp
ort
for
F
OR
Prin
Kind
Sp
Impro
Supp
printf
Supp
ting
Suxes.
ecifying
v
emen
ort
.
ort
F
OR
ranges
ts
of
of
TRAN
TRAN
to
the
string
calls
90,
90
in
arrays.
call
literal
to
functions in
including:
v
alues.
command,
and
union
images
including:
argumen
outside
ts,
whic
of
the
Support of calls to shared library functions with return v
Performance impro
vement for v
ery large applications.
h
allo
curren
ws
calls
t
alues.
lo
cation.
to
vii
Related
Do
cumen
tation
Related
F
or more
do
Documentation
cumen
ts:
Pr
o
gr
amming
programming
creating
programs.
HP/PAK
the
p
erformance
The
HP
HP
F
OR
F
OR
TRAN
The
HP
Guide
(92434-90002)
systems.
information
on
HP-UX
on HP-UX
on
HP-UX.
and
managing
Performanc
tools
F
OR
TRAN/9000
TRAN/9000
user
e
A
provided
Pr
programming language
C/HP-UX
R
efer
describ
programming,
(B2355-90653) pro
It
includes
libraries,
nalysis
Pr
o
gr
ammer's
enc
e
e
o
gr
Manual
the
information
optimizing
T
o
ols
User's
by
the HP
ammer's
Guide
on
(92453-90024)
C
programming
HP-UX
refer
to
vides an
ab
programs,
Guide
Program
R
efer
enc
e
(B3906-90002)
(B3906-90001)
systems.
language
the
follo
wing
o
v
out
erview
linking
of
programs,
and
p
(B3476-90016)
Analysis
Kit
describ
and
HP
CPr
on
HP-UX
orting
describ
(HP/P
and
e
the
o
gr
ammer's
es
AK).
The
HP
C++
Pr
o
gr
R
efer
enc
e
Car
d
(B1637-90001)
HP-UX
The
Pasc
programming
The
language
Tutorial
The
systems.
HP
Pasc
al/HP-UX
al/HP-UX
language
Assembly
L
programming
(92432-90005) in
Precision A
Pr
anguage
rchitecture and Instruction Set R
(09740-90014) and
Manual
1.1 arc
(09740-90039) describ e, respectiv
hitectures.
ammer's
o
gr
ammer's
PA-RISC 1.1 A
PA-RISC 2.0 A
Refer
on
HP-UX
R
efer
on
HP-UX
troduces
Guide
describ
ence
Guide
enc
ISBN 0-13-182734-0), describes the P
viii
(92501-90026) and
e
the
C++
Manual
(92431-90005)
(92431-90006)
systems.
e
Manual
Series
the assem
(92432-90001)
700/800
bly language debugger.
rchitectureand
ely, the P
rchitecture
,b
A-RISC 2.0 arc
the
HP
programming
and
describ
e
describ
systems.
eference Manual
Instruction Set R
A-RISC 1.0 and P
y Gerry Kane
hitecture.
C++
Quick
language
HP
the
HP P
ascal
es
assem
The
ADB
eference
A-RISC
(Prentice-Hall,
on
bly
The
Pr
o
c
describ
The
xdb
The
es
HP-UX
debugger.
X
Window
information ab
T
oorder
please
con
man
tact
e
dur
pro
uals,
e
Cal
ling
cedure
Symbolic
System
out the
call
y
our
lo
Conventions
calling
con
v
Debugger User's
cal
User's
X
HP
sales
Guide
Windo
DIRECT
oce.
R
efer
entions
on P
Guide
,
O'Reilly &
w
System.
at
1-800-637-7740.
enc
e
Manual
A-RISC systems.
(B2355-90044)
Associates,
Related
Documentation
(09740-90015)
describ
Inc., pro
Outside
the
es
vides
USA,
the
ix
T
yp
ographical
Con
v
en
tions
Typographical
computer
font
Conv
entions
Computer
literals,
In
syn
k
eyw
sho
underlined text In in
input.
italic
typ
e
In
v
alues
syn
titles
b
oldface
t
yp
e
Boldface
are
[
]
f
g
In
syn
In syn
m
ust
fon
source co
tax
formats,
ords,
and
wn.
teractive
tax
formats,
that
and
for
w
also
dened
tax
formats,
tax formats,
c
ho
ose
t
indicates
punctuation
examples,
y
ou
m
emphasis.
ords
in
in
an
item.
commands,
de, system
computer
underlined
w
ords
or
ust
supply
glossary
the
glossary
square
braces
output, and
fon
t
indicates
that
y
ou
c
haracters
.
Italics
denitions
.
brac
k
ets
enclose
a
k
eyw
m
ust
text
represen
in
are
also
indicate
enclose
list
from
ords,
options,
path
names.
commands,
enter
italics
used
terms that
optional
whic
exactly as
ts
user
represent
for
b
o
ok
items.
h
y
ou
j
In
choices.
.
.
.
In
can
.
.
.
Av
example
5
4
key
name
(N) An italicized w
Type the corresponding k
indicates a page and section n
Reference
Section 1 of the
x
syn
tax
formats,
syn
tax formats,
rep
eat
the
ertical ellipsis
ha
v
e
.F
or example,
a
v
a horizon
preceding
means
b
een
omitted.
ord follo
HP-UX R
ertical
bar
tal ellipsis
item
one
that
irrelev
ey on the
wed b
yan
umber in the
cc
(1) refers to the
eference
separates
items
indicates
or
more
times.
an
t
parts
keyboard.
umber in paren
HP-UX
c
c
.
in
that
of
a
gure
theses
page in
a
list
of
y
ou
or
Typographical
Conv
entions
Menu:Item
This
notation
example, since
selection
is
written
indicates a
Quit
is
on
as
File:Quit
choice
the
from the
File
.
men
u,
menu
the
bar.
men
F
or
u
bar
xi
In
In
The
This
This
Book
following
Bo
ok
is
a
brief
description
of
the
con
ten
ts
of
this
man
ual:
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
App
endix
App
endix
Appendix
App
endix D
1
2
Presen
in
terface
Describ
ts
es
an
and
ho
o
v
erview
online
w
to
of
the
help system.
compile,
debugger's
load,
and
graphical
execute
a
target
user
program.
3
Describ
es
ho
w
to
use
breakp
oin
ts,
w
atc
hp
oints,
traces, and
intercepts.
4
Describ
es
ho
wto
view and
manipulate
target
program
data.
5
6
7
8
A
B
C
Describ
Describ
Describ
and
Describ
es
es
es
visibilit
es ho
application
Describ
Describ
Describ
es
es
es
Describes
ho
w
to
use
the
how
to
customize
the
concepts
y
rules,
and
w
to
use
the
requiremen
ts.
the debugger's
the
debugger's
the
debugger's
the debugger's
debugger's
the
of
blo
c
the
use
debugger
line-mode
language
target
ob ject
debugger.
ks
and
of
qualied
to
interface.
managers.
managers.
managers.
command
en
vironments,
names.
handle
sp
line.
ecial
scop
e
Appendix E
This man
ual also con
xii
Describes the debugger's user in
tains a Glossary and Index.
terface managers.
Contents
1.
Ov
erview
HP/DDE
HP/DDE
Using
2.
Compiling,
Preparing
Inv
oking
Setting
Stopping
In
v
oking
Startup
In
v
oking
Using
Using
A
ttac
hing
Using
Using
Stopping
Restarting
Using
Using
Interrupting a Running Program
Interrupting in System or Nondebuggable Routines
Examining Source Files
Executing the T
Using Command Buttons
Using the go Command
Using the step Command
Using the Mouse . . . . . . . . . . . . . . . . . . . . 2-17
at
a
Glance
Online
HP/DDE
Loading,
the
T
arget
the
Debugger
P
A
TH
the
Debugger
and
Loading
.
.
.
and
Loading
the
File
the debug
the
Debugger
the
File
the debug
the
T
arget
the
T
arget
the File
the
restart
arget Program
.
Help
.
Online
and
Program
.
and
MANP
a
T
.
. .
a
T
Men
u
.
Command .
to
Men
u
.
Command
Program .
Program
Menu
.
Command
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
Help
Executing
.
arget
.
arget
.
.
.
. . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
. .
the
T
arget
Program
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A
TH V
ariables
.
.
.
.
.
Program
.
.
.
.
.
Program
.
.
.
.
.
.
.
.
a Running
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
. . . .
. . . . . . . . . . . . . . . 2-14
. . . . . . . . . . . . . . .
. . . .
. . . . . . . . . . . . . . . . 2-16
. . . . . . . . . . . . . 2-15
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
During
.
.
F
rom
.
.
.
.
Process
.
.
.
.
. .
.
.
.
.
.
.
Debugger
.
.
.
.
.
.
.
.
the
Debugger .
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
. .
. .
.
.
.
. .
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
. .
.
.
. .
. .
. .
.
. .
.
.
.
.
.
. . . . . . . . . . 2-10
. . . . . 2-10
. . . . . . . . 2-12
.
.
.
.
. 1-7
. .
.
. 2-3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
. 2-14
1-2
1-6
2-2
2-3
2-3
2-4
2-5
2-5
2-6
2-7
2-7
2-7
2-9
2-9
2-9
2-9
Contents-1
3.
Looking
Using
Using
Using
Using
Setting
Using
Using
Sp
Sp
Breaking
Setting
Using
Using
Using
Setting
Viewing
Using
Using
Using
Using
Setting
Using
Using
Using
Setting
Using
Using
at the
the
tb
the
en
Monitors
Monitors
Breakpoin
the
Mouse
the
breakp
ecifying Lo
ecifying
at Blo
Breakp
Breakp
the Break
the
Breakp
W
atc
hp
and
Command
the
W
atc
the
Data
the
watc
Traces
the
T
race
the
T
race
the trace
In
tercepts
the
In
tercepts
the in
tercept
Call/Return
Command
vironment
(Breakp
.
ts .
cations
Actions
oin
oin
Mo
h
W
hpoin
. .
Command
oin
.
.
.
.
.
.
oin
t
Command
cks
or Routines
oin
ts
ts
When
Men
u
oin
t
Set/Change
ts
.
.
difying
Buttons
Men
u
atc
hp
t
Command
.
.
Men
u
Set/Change
.
. .
Dialog
Command
Stac
k
.
.
.
.
.
Command .
ts,
W
atc
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
in
Alternate
Debugging
.
.
.
.
.
.
.
.
.
.
W
atc
hp
oin
.
.
. .
.
.
.
.
oin
t
Set/Change
.
.
.
.
.
. .
. .
. .
Dialog
.
.
.
. .
. .
.
Bo
x
.
.
.
.
.
.
.
. .
hp
oin
ts,
. .
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
Source
Lo
.
.
.
Dialog Bo
.
.
. .
ts
.
.
.
.
.
. .
.
.
.
.
.
.
. .
Bo
x
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
T
races,
.
.
.
.
.
.
. .
.
.
.
.
.
.
Files
ops
.
.
x .
.
.
.
.
.
.
Dialog
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
. .
.
.
.
. .
.
.
.
.
.
.
Bo
.
.
.
.
.
.
. .
.
.
.
and
.
.
. .
.
.
.
.
.
.
.
.
.
.
x
.
.
.
.
.
.
.
.
.
. .
.
.
In
tercepts)
.
.
.
.
. .
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
. .
.
.
.
. .
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2-18
.
2-19
.
2-19
.
3-2
.
3-3
.
3-3
.
3-3
.
3-4
. 3-4
.
3-4
. 3-4
. 3-5
.
3-5
.
3-6
.
3-8
.
3-9
.
3-10
.
3-11
.
3-12
.
3-13
.
3-14
.
3-15
. 3-16
.
3-17
.
3-18
.
3-18
. 3-20
4. Viewing and
Examining V
Using Command Buttons
Using the Mouse
Using the Data V
Using Debugger
Examining Arra
Examining Ob jects Referenced b
Contents-2
Manipulating T
ariables and Expressions
. . . . . . . . . . . . . . . . . . . .
alue Men
Commands . . . . . . . . . . . . . . . 4-4
ys .
arget Program Data
. . . . . . . . . . . . 4-2
. . . . .
u . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . 4-3
. . . . . . . . . 4-4
yP
ointers .
. . . . . . . 4-6
. . . . . 4-5
4-3
Examining
Using Register
5.
Using
Abbreviating
En
tering
Using
Con
Resolving
Resolving
Editing
Using
Recording
In
v
Redirecting
Creating
Using
Com
Creating
Creating
Understanding
Examining Link
Examining
Debugger
Multiple
Command
tinuing
the
the
oking
Shell
Alias
Reserv
bining
Errors
Execution
Action
Command
Placing
Buers
Registers
Debugger Commands
Commands
Syn
tax
Case Sensitivit
Command
Command
Command Sequences
Commands
Input
and
ed
Iden
Debugger
Action
Conditional
in
Action
of
List Execution
step
ed Lists
.
.
. .
Commands
Commands
Debugger
Lists
.
.
on
Conicts
y .
Line
History
and
Output
Dene
tiers
Commands
Lists
Action List
Multiple
and
.
Action Lists
Lists
.
.
.
go
Commands
.
.
.
.
.
. .
.
.
Commands
.
. .
the
Next
.
.
.
. .
.
.
F
acilit
for
from
the Debugger
.
Macros
and Sp
Action
F
ecial
Using
.
.
.
Execution in
.
.
. .
Lists
ollo
wing
. .
. .
.
.
.
.
. .
.
.
. .
. .
Line
.
.
.
.
.
.
y
Later
.
.
.
.
.
.
. .
. .
an
. .
in
.
.
.
.
.
.
. .
.
.
.
.
.
.
on
One
. .
. .
.
.
.
.
.
.
.
.
. .
. .
.
.
.
Pla
.
.
.
.
.
.
Macros
Action
.
.
.
.
.
Sp
. .
.
.
In
teractiv
.
.
Action
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
Line
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
ybac
k
. .
.
.
.
.
.
.
.
.
.
Lists
.
.
.
.
.
.
ecial
Circumstances
. .
.
.
.
.
e
step
.
.
.
Lists
.
. .
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4-7
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
. .
4-8
.
4-10
.
4-12
.
5-2
.
5-2
.
5-2
.
5-3
. 5-3
.
5-4
.
5-5
5-5
.
5-6
.
5-7
.
5-7
.
5-9
.
5-11
.
5-15
. 5-15
.
5-16
5-16
.
5-16
. 5-16
.
5-17
. 5-17
6.
Customizing
Using the Options
Using Startup Command Files
Using a P
A Sample P
Emulating Other Debuggers
Compatibility
Compatibility with db
the
Debugger
Menu.
ersonal Startup File to Customize
ersonal Startup File .
with xdb
. . . . . . . . . . . . . . . . . 6-2
. . . . . . . . . . . . . .
the Debugger
. . . . . . . . . . . . . 6-5
. . . . . . . . .
. . . . . . . . . . . . . . . . . 6-8
x . . . . . . . . . . . .
. . . . . . . 6-8
. . . . . 6-9
. . 6-4
Contents-3
. 6-3
7. Iden
8.
tifying Program
Understanding
Changing
Overriding
Applying
Using
Debugging in
Examining
Debugging
Debugging
Assem
Debugging Optimized Code
Debugging P
Debugging Applications That Use ioctl or
Running the Debugger Remotely
Qualied
Blo
c
F
ully
Image
Sp
ecial
Qualied
Frame
A
ttac
Core
Making
Stripp
Viewing
Setting
En
vironmen
Thread-Sp
bly
Using
Using
Sa
ving
Optimized Code and Unoptimized Co de
What Optimization Does to Program Logic
What Optimization Do
the
the
Scop
e
k
Qualied
Qualied
Qualied Names
Blo
c
k
Names
Sym
b
ols
Bloc
Sp
Core
hing
to
File
Debugging
Shared
Multi-Threaded
lib
dce.sl
ed
and Unstripp
and Manipulating
Breakp
t
ecic Debugger
Lev
el
the
Assem
Debugger Commands
Assem
arent and Child Processes
Ob
jects
Blo
c
ks
and
En
vironment
Curren
and
Names
Names
Qualied
k Qualied
ecial
Files
a
Core
oin
in
Debugging .
bly
t
Language
Visibilit
. .
Names
.
Libraries
W
Multi-Threaded
bly
.
.
F
for
Predened,
.
.
.
Situations
.
.
File
.
ritable
ts
on
Threads
Instructions
Co
de
in
En
vironmen
. .
y
Rules
. .
.
.
.
.
. .
orms
.
.
Names
.
. .
.
.
.
.
.
Applications
.
ed V
ersions
Threads .
Commands
. .
a
File
. . . .
es to Data .
ts
.
.
.
.
. .
. .
. .
. 7-2
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
. .
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
. .
. .
. .
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
User-Declared,
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
of
lib
dce.sl
.
.
. .
. .
. .
Applications
.
.
. .
.
.
.
Dialog
.
.
.
. . . . . . . . . . . . . . 8-24
Bo
x
.
.
.
.
. .
.
.
. . . . . . . . . . . . 8-17
. . . . . . . . . . 8-18
. . . . . . . . . . . 8-21
. . . . . . . . . .
curses . . . . . . . 8-23
.
. .
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . .
and
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
External
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 8-6
.
. 8-7
.
.
.
.
.
.
.
. 8-10
.
.
.
.
. 8-13
. .
.
. 8-16
. 8-18
. 8-22
7-3
7-4
7-4
7-6
7-6
7-7
7-9
7-9
7-9
7-10
8-2
8-2
8-3
8-4
8-7
8-8
8-9
8-11
8-13
8-14
Contents-4
A. Line-Mo
In
v
The
de User
oking
User
Screen Displa
Examples
B.
Language Managers
C
Language
C++
Language
F
ORTRAN
HP
P
ascal
C.
HP-UX
Solaris
T
arget
HP-UX
PA-RISC
SP
Managers
P
Solaris SP
In
terface
the
Line-Mo
In
terface Startup
y
Con
v
.
.
.
.
Manager
Manager
Language
Language
Assembly
AR
C
Assem
A-RISC
AR
T
arget
C
T
arget
de
User
en
tions
.
.
.
.
.
.
Manager
Manager
bly
Language
Manager
Manager
In
File .
.
.
.
.
.
.
.
terface
.
. .
.
. .
.
.
. .
.
.
.
.
.
. .
.
. .
.
.
.
. .
.
.
.
.
.
.
. .
.
. .
.
.
.
.
.
.
.
.
Language Manager
Manager
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
. .
.
. .
.
.
. .
.
.
. .
. .
. .
.
A-2
.
.
.
.
.
.
.
.
A-3
.
.
.
.
. .
. .
.
.
.
.
.
.
.
. .
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
.
.
.
.
. .
. .
.
.
.
.
.
.
.
A-4
.
A-5
.
B-3
.
B-7
.
B-13
.
B-18
.
B-22
.
B-25
C-3
.
C-7
D. Ob
HP
Solaris
E.
User
Graphical
Line-Mo
SoftBenc
Glossary
Index
ject
SOM
In
Managers
Ob
ject
SP
AR
C
terface
Managers
User
de
User
h
User In
Manager
Ob
ject
Manager
In
terface
In
terface
Manager
Manager
terface Manager
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
D-3
. .
.
.
.
.
.
.
.
.
.
.
.
.
D-4
.
.
.
.
.
.
.
.
. .
. .
.
.
E-3
.
.
.
.
.
.
.
.
.
.
.
.
. E-4
. .
.
.
.
.
.
.
.
.
.
.
.
E-5
Contents-5
Figures
1-1. Debugger
1-2.
The
2-1.
Load/Rerun
2-2.
Source
2-3.
Stac
3-1.
The Break
3-2. The
3-3.
The
3-4.
The
3-5.
The
3-6.
The
3-7.
The
3-8.
The
4-1.
The
4-2.
Sho
w
6-1.
The
6-2.
A Sample
7-1.
Sample
7-2.
Sample
7-3.
Sample Call/Return
8-1. The
8-2.
Stac
8-3. Assem
8-4. Unoptimized Code: Statemen
8-5. Optimized Code: Statemen
Main Windo
In
tro
ductory
Dialog
File
Displa
k
View
Dialog
Menu
Breakpoin
Data
W
atc
Data
T
race
T
race
In
tercepts
Data
Registers
Options
Mo
Mo
Threads Dialog
k
View
bly Instructions Dialog Bo
t
W
atc
hp
h
Men
u
W
atc
hp
Men
u
Set/Change
Dialog
Value
Dialog
Men
Personal
dule
Illustrating
dules
Dialog
w
.
HP/DDE
Bo
x
.
y
.
.
.
Bo
x
.
.
.
.
.
Set/Change
oin
ts Dialog
.
.
.
.
oin
t
Set/Change
. .
.
.
Dialog
Bo
x
Tear-O
u
Illustrating
Bo
Bo
.
.
Startup
Stac
k
Box
x
Showing
Men
x
.
. .
.
.
.
.
.
.
.
.
(General)
.
File
Scop
and
t-to-Instruction
.
.
.
.
.
.
.
.
.
.
Help
Screen
.
.
.
.
. .
.
.
.
.
.
.
Dialog
Box
.
.
.
Dialog
.
.
.
Bo
x
.
.
.
u
.
.
.
.
.
.
.
eand
F
ully
Qualied
Program
. .
. .
Curren
x.
t-to-Instruction Mapping .
.
.
.
.
.
.
.
.
. .
.
.
. .
. .
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
Bo
x
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
Bo
x
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
. .
. .
.
.
.
.
.
.
.
Visibility
Names
.
.
. .
.
t
Thread
. . . . . . . . . . . . 8-14
Mapping .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
. 2-18
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 7-8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . 8-19
. . . . 8-20
1-3
1-7
2-6
2-12
3-6
3-7
3-9
3-11
3-12
3-15
3-16
3-19
4-4
4-11
6-2
6-6
7-5
7-11
8-8
8-10
Contents-6
T
ables
5-1.
Reserved
Iden
tiers
and
Sp
ecial
Macros
.
.
.
.
.
.
.
.
.
.
5-12
Contents-7
Ov
erview
The
HP
debugger"
op
erating
compilers
The
debugger
F
or
users
user
in
terface.
Distributed
or \HP/DDE")
system.
and
without
the
pro
The
HP
vides
access
Debugging
is a
debugger
assem
bler.
a
po
werful
to
OSF/Motif,
En
vironmen
high-lev
op
erates on
graphical
el
language
the
t
(also
referred
debugger
ob ject
user
in
terface
debugger
to
as
for
the
les generated
based
also
pro
vides
\the
HP-UX
b
y
HP
on
OSF/Motif.
a line-mo
1
1
de
The
debugger
debugging
This
chapter
in
terface
Note
en
vironment
giv
and
to
supp
orts
es
a
brief
the
debugger's
HP/DDE is
SoftBenc
that
diers
manual.
The
SoftBenc
Solaris
b
oth
exp
that
y
in
tro
also the
h
v
ersion of
somewhat
Ho
w
ev
h
systems.
ert
ou
can
duction
extensiv
er,
the
Program
and
no
vice
customize
to
the
debugger's
e
online help.
default
SoftBenc
HP/DDE has
from
the
debugger
Debugger
users
with
to
t
y
our
h
Program
a graphical
in
terface
commands
runs
an
easy-to-use
application.
graphical
user in
presen
ted
are
the
on
b
oth
user
Debugger.
The
terface
in
this
same.
HP-UX
and
Overview 1-1
In
This
Book
HP/DDE
The
debugger
Y
ou
con
trol
command
also
has
a line-mo
The
main windo
program
Figure
1
Men
In
v
I/O.
1-1
u
ok
Some
Other
manipulate
and
more.
2
Input
En
ter
Y
ou
can
source
commands. T
double-clic
at
a
Glance
provides
the
debugger
en
try
line,
de user
wof
Some
,
are:
Bar
e
commands
dialog
dialog
b
o
b
assem
Bo
x
parameters
en
ter
co
de,
debugger
ext
king.
ap
ow
b
y
or
from
interface
the debugger
of
the
features
or
displa
xes
allo
w
o
xes
include
bly
code,
for
command
information
output,
can
b
e
erful graphical
executing
commands
customizable
whic
h
displa
ys
of
the
y
dialog
y
ou
to
dynamic
sp
b
o
ecify
displa
registers, v
buttons
either
selected
b
or
program
either
y
t
user
command
is
describ
source
debugger
xes.
options
ys
ariables,
and
yping
or
I/O
b
y
dragging
in
terface
from
based
men
us,
buttons.
ed
in
App
endix
co
de,
debugger
main
windo
to
debugger commands.
that
allo
w
y
ou
threads,
pull-do
b
y
selecting
areas)
call/return
wn
men
for
the
mouse,
use
on
OSF/Motif.
from
the
(The debugger
A.)
w,
to
output,
sho
view
wn
in
and
stac
and
ks,
us.
text
(from
the
with
these
or
b
y
3
In
terrupt
In
terrupt
This
when the
Button
the
button
target
debugger
c
hanges
4 Lo cation Buttons
Change curren
t lo cation up and do
Indicators in this area sho
program counter (
1-2 Overview
or
the
target
from
Interrupt
program
is
executing.
wwhen the
PC
) lo cation. Locations are specied as function names.
program.
Debugger
wn the call/return
to
Interrupt Program
stack.
current location diers from the
In
This
1
Book
Figure 1-1. Debugger Main Windo
w
Overview 1-3
In
This
5
Annotation
Book
Margin
Shows
Clic
kwith
Clic
k
An
arro
6
Source
Clic
king
p
op-up
monitoring
T
o
searc
7
Customizable
In
v
ok
Y
ou
Options:User
8
Debugger
This
w
arnings,
9
Debugger
source le
the left
on
the
w
indicates
File
Displa
the
menu,
commands.
h
for
e
common
can
c
hange
Output
transcript
and
Command
line n
um
mouse
circled
B
sym
the
y
Area
righ
t
mouse
whic
h
con
text
strings
Command
debugger
these
buttons
Configurable
Area
pad
ec
ho
displa
ys
the
Input
b
ers.
button
b
ol
to
curren
t
button in
tains
a
in
the
Buttons
commands.
Buttons
es
debugger
output
Bo
x
on
delete
program
this area
n
um
b
source
or
create
from
a
line
n
um
the
breakp
coun
ter
in
er
of
program
le,
select
additional
.
commands,
debugger
b
er
to
set
oint.
lo
cation.
v
ok
es
the
execution
Visit:Search
buttons
displa
ys messages
commands.
a
breakp
Source
b
y
oin
Actions
and
.
selecting
and
t.
En
ter
debugger
F
or
a
complete
examples
10 User
see
Program I/O
Target program output is displa
commands.
list
of
the
online
Area
debugger
command
commands,
their
reference.
yed here. Input to target programs is
entered here.
The debugger's
task. F
or example, y
Enter debugger commands in the command
Invoke actions from men
GUI often pro
ou can:
us, dialog bo
vides several metho ds of performing a particular
input bo
xes, or command buttons.
Invoke actions bypointing and clicking with the mouse.
1-4 Overview
options,
x.
and
usage
In
This
1
Book
This man
eac
h
task.
In
general,
the
widest
man
ual
sho
F
or
complete
the
debugger's
debugger's
Note
ual attempts
en
tering
range of
ws
only
debugger
options and
the
information
online help.
command
If,
when
do
es
it
is
v
DDE.geometry
or
remov
line.
not
ery
to
describ
more
y
lo
small),
e
commands
commonly
on
a
You
ou
start
ok
the
for
this
denition
e
the
most
allows
the greatest
particular
can also
HP/DDE
w
a
y
it
y
ou
probably
an
earlier
common
in
the
used
options
command,
en
ter
help
4.0,
do
es
in Figure
hav
release
from
y
alternativ
command
exibilit
to
see
c
ommand
the
main
e dened
of
HP/DDE.
our
X
resources.
en
try
y
and
debugger
Command
debugger
1-1
(for
the X
es
for
p
bo
x pro
con
trol.
commands.
Reference
name
windo
example,
resource
Commen
erforming
vides
This
on
the
w
if
t
out
in
Overview 1-5
In
This
Book
HP/DDE
The debugger
use
k
eyw
Online
ord
has
searc
system.
Figure
men
Overview
Y
selection
The
ou
u
can
follo
1-2
bar
shows
of
.
also
in
wing
the
in
the
is
help:
Getting
of
the
through
Common
in
v
user
Common
debugger's
Debugging
ok
e general
in
terface.
Debugging
Started
basic
debugger functions
Help
an
extensiv
hes
or
the in
debugger's
v
ok
e
the
Help
Manager,
a
brief
con
graphical
debugging
Tasks:
debugger
Tasks:
with an
e
h
yp
clic
k
on
hyp
troductory
main
windo
debugger's
whic
description of
tains
a
quic
user in
pro
cedures.
Graphical
functions
Command
emphasis
ertext-based
erlinks to
help
screen
w.
Clic
online
h
is lo
help
cated
the ma
k
start
guide
terface, and
User
with
an
Line
describ
on
using
online
navigate
that
y
ou
k
on
Help
facilit
y
on
the
jor topical
that
a
tutorial
Interface
emphasis
es
debugger
help
facilit
through the
can
in
and
from
the
F
ron
t
P
divisions
sho
ws
the
that
describ
on
using
ho
w
to
in
commands.
v
ok
then
Top
anel.
basic
w
the
v
y
.
Y
help
e
from
select
Level
of
the
alks
es
ho
graphical
ok
e
general
ou
can
the
online
functions
y
ou
w
to
Graphical
and
sho
ws
User
ho
w
Command Reference
useful
in
Commenting
your
examples.
v
oking
help
on
comments about the online help to Hewlett-P
1-6 Overview
Interface
to
customize
describ
(Y
ou can
c
ommand
the
HP/DDE
describ
es
also in
name
Online
the
graphical
debugger
vok
in
the
es
the v
commands
e help
debugger
Help
arious debugger
user
in
terface.
and
on
a
particular
command
System
describes
ackard.
display
options
command
input
ho
w
and
b
o
y
ou
x.)
windows
con
tains
b
y
can
send
In
This
1
Book
Using
HP/DDE Online
HP/DDE
for.
Here
Clic
king
ma
jor
Figure
online
are
some
on
a
divisions
h
help
of
yp
erlink.
of the
1-2.
pro
the
The
Help
vides
metho
Hyp
online
Introductory
several
ds
y
ou
erlinks
help.
Hyp
text.
Searching for a k
allows y
ou to searc
eyword. Select the
h through the k
eyword index. Clic
display the help on that item.
Using the
help
command. The
command
reference page for the specied command.
HP/DDE
wa
ys to
nd
can
use:
connect topics
erlinks
Index
are
button to in
help
command
Help
Screen
the
topic
y
ou
are
within and
displa
y
ed
as
among the
underlined
voke a dialog bo
k on an index item to
name
invokes
Overview 1-7
lo
oking
xthat
the
In
This
Book
Pressing
windows.
Y
ou
can
na
including:
Clicking
another
Clic
king
the
History
topics
that
Selecting
More
information on
debugger's
F1
vigate
on an
topic.
on
an
y
the
men
to
obtain con
through
item
from
item
in the
button
ou
ha
v
e
Backtrack
using the
u
bar
b
text-sensitive
the
the
from
to
visited.
button to
y
clicking
HP/DDE
topic
hierarc
history list
in
v
ok
e
the
return
HP
Help
on
Help
help in
online
help
h
y
in
to return
a
dialog
to
the
System
and
then
dialog b
using
the
Help
to
a
b
o
x
previous
is
a
v
ailable
selecting
o
xes
sev
windo
previous
that
sho
topic.
from
Using
and
eral
ws
displa
metho
w
to
topic.
a
the
Help
list
y
ds,
go
to
Select
of
.
1-8 Overview
2
2
Compiling,
Program
This
c
hapter
Preparing
Starting
Load
Examining
Con
trolling
Viewing
For
more
see
the
command
bo
x.
The
online
graphical
describ
a
program
and
stopping
and
unloading a
source
the
the
current
information
online
b
y
en
command
help
user in
tering
Loading,
es:
for
the
target program.
les.
execution
execution
on
the
reference.
help
also
con
tains
terface.
and
debugging.
debugger.
of
the
target
call
debugger
Y
c
ommand
more
information
Executing
program.
stac
k.
commands
ou
can also
name
in
men
inv
the
on
tioned
ok
e
help
debugger
using
the
the
on
in
this
a
T
arget
c
hapter
particular
command
debugger's
input
Compiling, Loading, and Executing the Target Program 2-1
In
This
Book
Preparing
To
prepare
compiler's
causes
le.
F
$
You
can
directory
sources
If
you
option,
a
option
it to
or
example:
cc
-g
nd
/opt/langtools/dde/examples
for
average
attempt
the
debugger
(Warning)
Limited
Some
of
the
Y
ou
can
access
Line
n
um
b
Y
ou can
p
oin
t
names,
set breakp
compiled
initialize
compiled
necessary
the
T
arget
target
program
for
debugging,
add information
average.c
average.c
to
in
debug
F
,
OR
a
a
displa
Object
debugging
file
will
limitations on
the
v
alues
ers
are
not
a
v
oin
ts
and
virtual
with
-g
and
some
-altdbinfo
without
on
Solaris
-g
.
(Use of
systems.)
Program
for
debugging,
usually
needed b
sample
TRAN,
program
ys a
program
C++,
that
message similar
has
no
be available.
debugging
of
global
ailable
on
en
in
try
addresses.
w
ere
compiled
command
the
compile
-g
.
A
ythe
debugger
that
.
In
and
w
as
compiled
debug
co
v
ariables
the
p
oin
Ho
information.
de
compiled
Assem
ts
using
wev
er, if
without
to
set
breakp
initialize
the
compiler's
to
y
ou
can
that
directory
P
ascal.
to the
without
but not
bly
Instructions
pro
cedure
some
-g
oin
ts
-altdbinfo
program
debugging
the
program's
practice
,
y
without
following:
the
their
descriptions.
names,
mo
dules
,
y
ou
must
on
those
command
using
on,
ou
can
the
-g
dialog
en
w
ere
mo
the
option
ob
ject
in
the
also
nd
debugging
option
are:
b
o
x.
try
use the
dules
is
not
The
debugger
use source
program
will
command to
execution
not
automatically
display
or
in
v
oke
source co
debugger
displa
y
de. Ho
commands
source
wev
in
co
de.
er,
the
Y
ou
y
ou
source
cannot
area.
Shared libraries, whic
h are often compiled without
-g
, are a special case. See
\Debugging Shared Libraries" in Chapter 8 for more information.
2-2 Compiling, Loading, and Executing the Target Program
can
le
use
the
follo
displa
w
y
Loading...
+ 196 hidden pages