Professional Documents
Culture Documents
TIS Committee
May 1995
The TIS Committee grants you a non-exclusive, worldwide, royalty-free license to use the information disclosed in the
Specifications to make your software TIS-compliant; no other license, express or implied, is granted or intended hereby.
The TIS Committee makes no warranty for the use of this standard.
THE TIS COMMITTEE SPECIFICALLY DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, AND ALL
LIABILITY, INCLUDING CONSEQUENTIAL AND OTHER INDIRECT DAMAGES, FOR THE USE OF THE
SPECIFICATION AND THE INFORMATION CONTAINED IN IT, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY
PROPRIETARY RIGHTS. THE TIS COMMITTEE DOES NOT ASSUME ANY RESPONSIBILITY FOR ANY ERRORS
THAT MAY APPEAR IN THE SPECIFICATION, NOR ANY RESPONSIBILITY TO UPDATE THE INFORMATION
CONTAINED IN THEM.
The TIS Committee retains the right to make changes to this specification at any time without notice.
This document specifies the second generation of symbolic debugging information based on the DWARF format that has
been developed by the UNIX International Programming Language Special Interest Group (SIG). This document was
distributed earlier as the Industry Reveiw Draft.
Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appears in all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name UNIX International not be used in advertising or publicity
pertaining to distribution of the software without specific, written price permission. UNIX International makes no
representations about the suitability of this documentation for any purpose. It is provided “as is” without express or
implied warranty.
UNIX INTERNATIONAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS DOCUMENTATION, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL UNIX INTERNATIONAL
BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS DOCUMENTATION.
IBM is a registered trademark and OS/2 is a trademark of International Business Machines Corporation.
The Intel logo is a registered trademark, and i386 and Intel386 are trademarks of Intel Corporation and may be used only
to identify Intel products.
Microsoft, Microsoft C, MS, MS-DOS, and XENIX are registered trademarks and Windows is a trademark of Microsoft
Corporation.
UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company
Limited.
* Other brands and names are the property of their respective owners.
T a b le of C on t en t s
1. I N T R O D U C T I O N . . . . . . . . . . . . . . . . . 1
1.1 P u r pose a n d S cope . . . . . . . . . . . . . . . . 1
1.2 O ver view . . . . . . . . . . . . . . . . . . . 1
1.3 Ven d or E xt en sib ilit y . . . . . . . . . . . . . . . 2
1.4 C h a n ges fr om Ver sion 1 . . . . . . . . . . . . . . 2
2. G E N E R A L D E S C R I P T I O N . . . . . . . . . . . . . . 5
2.1 T h e D eb u gging I nfor ma t ion E n t r y . . . . . . . . . . . 5
2.2 A t t r ib u t e T ypes . . . . . . . . . . . . . . . . . 5
2.3 R ela t ionsh ip of D eb u ggin g I nfor ma t ion E n t r ies . . . . . . 7
2.4 L oca t ion D escr ipt ions . . . . . . . . . . . . . . . 7
2.5 T ypes of D ecla r a t ions . . . . . . . . . . . . . . . 16
2.6 A ccessib ilit y of D ecla r a t ions . . . . . . . . . . . . 16
2.7 V isib ilit y of D ecla r a t ions . . . . . . . . . . . . . . 16
2.8 Vir t u a lit y of D ecla r a t ions . . . . . . . . . . . . . 17
2.9 A r t ificia l E n t r ies . . . . . . . . . . . . . . . . 17
2.10 T a r get -S pecific A d d r essing I n for ma t ion . . . . . . . . . 17
2.11 N on-D efinin g D ecla r a t ions . . . . . . . . . . . . . 18
2.12 D ecla r a t ion C oor d in a t es . . . . . . . . . . . . . . 18
2.13 I den t ifier N a m es . . . . . . . . . . . . . . . . 19
3. P R O G R A M S C O P E E N T R I E S . . . . . . . . . . . . . 21
3.1 C omp ila t ion U n it E n t r ies . . . . . . . . . . . . . 21
3.2 M odu le E n t r ies . . . . . . . . . . . . . . . . . 23
3.3 S u b r out in e a n d E n t r y P oin t E n t r ies . . . . . . . . . . 23
3.4 L exica l Block E n t r ies . . . . . . . . . . . . . . . 29
3.5 L a b el E n t r ies . . . . . . . . . . . . . . . . . 30
3.6 W it h S t a t emen t E n t r ies . . . . . . . . . . . . . . 30
3.7 T r y a n d C a t ch Block E n t r ies . . . . . . . . . . . . 31
4. D A T A O BJ E C T A N D O BJ E C T L I ST EN TR IES . . . . . . . 33
4.1 D a t a O bject E n t r ies . . . . . . . . . . . . . . . 33
4.2 C omm on Block E n t r ies . . . . . . . . . . . . . . 35
4.3 I mpor t ed D ecla r a t ion E n t r ies . . . . . . . . . . . . 35
4.4 N a m elist E n t r ies . . . . . . . . . . . . . . . . 35
5. T Y P E E N T R I E S . . . . . . . . . . . . . . . . . . 37
5.1 Ba se T ype E n t r ies . . . . . . . . . . . . . . . . 37
5.2 T ype M odifier E n t r ies . . . . . . . . . . . . . . . 38
5.3 T yped ef E n t r ies . . . . . . . . . . . . . . . . . 38
5.4 A r r a y T ype E n t r ies . . . . . . . . . . . . . . . 39
5.5 S t r u ct u r e, U nion, a n d C la ss T ype E n t r ies . . . . . . . . 40
5.6 E nu m er a t ion T ype E n t r ies . . . . . . . . . . . . . 45
5.7 S u b r out in e T ype E n t r ies . . . . . . . . . . . . . . 45
5.8 S t r in g T ype E n t r ies . . . . . . . . . . . . . . . 46
-i-
-- --
5.9 S et E n t r ies . . . . . . . . . . . . . . . . . . 46
5.10 S u b r a nge T ype E n t r ies . . . . . . . . . . . . . . 47
5.11 P oint er t o M em ber T ype E n t r ies . . . . . . . . . . . 48
5.12 F ile T ype E n t r ies . . . . . . . . . . . . . . . . 48
6. O T H E R D E BU G G I N G I N F O R M A T I O N . . . . . . . . . . 51
6.1 A cceler a t ed A ccess . . . . . . . . . . . . . . . 51
6.2 L ine N u m b er I n for m a t ion . . . . . . . . . . . . . 52
6.3 M a cr o I n for ma t ion . . . . . . . . . . . . . . . 59
6.4 C a ll F r a me I nfor ma t ion . . . . . . . . . . . . . . 61
7. D A T A R E P R E S E N T A T I O N . . . . . . . . . . . . . . 69
7.1 Ven d or E xt en sib ilit y . . . . . . . . . . . . . . . 69
7.2 R eser ved E r r or Va lu es . . . . . . . . . . . . . . 69
7.3 E xecu t a b le O b ject s a n d S h a r ed O b ject s . . . . . . . . . 69
7.4 F ile C onst r a in t s . . . . . . . . . . . . . . . . 70
7.5 F or ma t of D eb u ggin g I nfor ma t ion . . . . . . . . . . . 70
7.6 Va r ia b le L en gt h D a t a . . . . . . . . . . . . . . . 75
7.7 L oca t ion D escr ipt ions . . . . . . . . . . . . . . . 77
7.8 Ba se T ype E ncodings . . . . . . . . . . . . . . . 79
7.9 A ccessib ilit y C odes . . . . . . . . . . . . . . . 79
7.10 Visib ilit y C odes . . . . . . . . . . . . . . . . . 80
7.11 Vir t u a lit y C odes . . . . . . . . . . . . . . . . 80
7.12 S our ce L a ngu a ges . . . . . . . . . . . . . . . . 80
7.13 A d d r ess C la ss E ncodings . . . . . . . . . . . . . . 80
7.14 I den t ifier C a se . . . . . . . . . . . . . . . . . 81
7.15 C a lling C onven t ion E ncodings . . . . . . . . . . . . 81
7.16 I n lin e C odes . . . . . . . . . . . . . . . . . . 81
7.17 A r r a y O r d er in g . . . . . . . . . . . . . . . . . 81
7.18 D iscr imin a n t L ist s . . . . . . . . . . . . . . . . 81
7.19 N a m e L ooku p T a b le . . . . . . . . . . . . . . . 82
7.20 A d d r ess R a nge T a b le . . . . . . . . . . . . . . . 82
7.21 L in e N u m ber I n for m a t ion . . . . . . . . . . . . . 82
7.22 M a cr o I n for m a t ion . . . . . . . . . . . . . . . 83
7.23 C a ll F r a m e I n for ma t ion . . . . . . . . . . . . . . 84
7.24 D epen d en cies . . . . . . . . . . . . . . . . . 84
8. F U T U R E D I R E C T I O N S . . . . . . . . . . . . . . . 85
A ppen d ix 1 -- C u r r en t A t t r ibu t es b y T a g Va lu e . . . . . . . . . 87
A ppen d ix 2 -- O r ga n iza t ion of D eb u ggin g I nfor ma t ion . . . . . . . 97
A ppen d ix 3 -- S t a t em en t P r ogr a m E xa m ples . . . . . . . . . . 99
A ppen d ix 4 -- E ncoding a n d decodin g va r ia b le len gt h da t a . . . . . . 101
A ppen d ix 5 -- C a ll F r a m e I nfor ma t ion E xa mples . . . . . . . . . 103
- ii -
-- --
L ist of F igu r es
F igu r e 1. T a g na mes . . . . . . . . . . . . . . . . . . 5
F igu r e 2. A t t r ib u t e n a mes . . . . . . . . . . . . . . . . 6
F igu r e 3. A cc essib ilit y codes . . . . . . . . . . . . . . . 16
F igu r e 4. Visib ilit y codes . . . . . . . . . . . . . . . . 17
F igu r e 5. Vir t u a lit y codes . . . . . . . . . . . . . . . . 17
F igu r e 6. E xa m ple a d dr ess cla ss codes . . . . . . . . . . . . 18
F igu r e 7. L a ngu a ge n a m es . . . . . . . . . . . . . . . . 21
F igu r e 8. I den t ifier ca se codes . . . . . . . . . . . . . . . 22
F igu r e 9. I n line codes . . . . . . . . . . . . . . . . . 27
F igu r e 10. E n codin g a t t r ib u t e va lu es . . . . . . . . . . . . . 37
F igu r e 11. T ype modifier t a gs . . . . . . . . . . . . . . . 38
F igu r e 12. A r r a y or d er in g . . . . . . . . . . . . . . . . 39
F igu r e 13. D iscr im in a n t d escr ipt or va lu es . . . . . . . . . . . 45
F igu r e 14. T a g encod in gs ( pa r t 1) . . . . . . . . . . . . . . 72
F igu r e 15. T a g encod in gs ( pa r t 2) . . . . . . . . . . . . . . 73
F igu r e 16. C h ild d et er m in a t ion en codin gs . . . . . . . . . . . 73
F igu r e 17. A t t r ibu t e encod in gs, pa r t 1 . . . . . . . . . . . . 74
F igu r e 18. A t t r ibu t e encod in gs, pa r t 2 . . . . . . . . . . . . 75
F igu r e 19. A t t r ibu t e for m en cod in gs . . . . . . . . . . . . . 76
F igu r e 20. E xa mples of u n signed L E B128 en codin gs . . . . . . . . 76
F igu r e 21. E xa mples of signed L E B128 en codin gs . . . . . . . . . 77
F igu r e 22. L oca t ion oper a t ion en cod in gs, pa r t 1 . . . . . . . . . 78
F igu r e 23. L oca t ion oper a t ion en cod in gs, pa r t 2 . . . . . . . . . 79
F igu r e 24. Ba se t ype encoding va lu es . . . . . . . . . . . . . 80
F igu r e 25. A cc essib ilit y encod in gs . . . . . . . . . . . . . . 80
F igu r e 26. Visib ilit y en codin gs . . . . . . . . . . . . . . . 80
F igu r e 27. Vir t u a lit y en codin gs . . . . . . . . . . . . . . . 80
- iii -
-- --
- iv -
-- --
Tool Interface Standards
DWARF Debugging Information Format, Version 2.0
The DWARF Debugging Information Format Specification, Version 2.0, is the result of the work
of the Tool Interface Standards (TIS) Committee--an association of members of the
microcomputer industry formed to work toward standardization of the software interfaces visible
to development tools for 32-bit Intel Architecture operating environments. Such interfaces
include object module formats, executable file formats, and debug record information and
formats.
The goal of the committee is to help streamline the software development process throughout the
microcomputer industry, currently concentrating on 32-bit operating environments. To that end,
the committee has developed specifications--some for file formats that are portable across
leading industry operating systems, and others describing formats for 32-bit Windows operating
systems. Originally distributed collectively as the TIS Portable Formats Specifications, Version
1.1, these specifications are now separated and distributed individually.
The DWARF Debugging Information Format Specification, Version 2.0, is the latest deliverable
of the TIS Committee. It is based on existing, proven formats in keeping with the TIS
Committee's goal to adopt, and when necessary, extend existing standards rather than invent new
ones.
TIS Committee members include representatives from Absoft Corporation, Autodesk
Corporation, Borland International Corporation, IBM Corporation, Intel Corporation, Lahey
Corporation, Lotus Corporation, MetaWare Corporation, Microtec Research, Microsoft
Corporation, Novell Corporation, The Santa Cruz Operation, and WATCOM International
Corporation. PharLap Software Incorporated and Symantec Corporation also participated in the
specification definition efforts.
1. IN TRODU CTION
t he d iffer en t debu ggin g infor ma t ion en t r ies. Sect ions t hr ee, four a nd five descr ibe t h e
specific debu gging infor ma t ion en t r ies a nd h ow t hey com m u nica t e t he necessa r y
infor ma t ion a b out t he sour ce pr ogr a m t o a debu gger . Sect ion six descr ibes debu gging
infor ma t ion cont a ined ou t side of t h e deb u ggin g in f or m a t ion en t r ies, t h em selves. T he
encoding of t he D W A R F infor ma t ion is pr esen t ed in sect ion seven .
Sect ion eigh t descr ibes some fu t ur e dir ect ions f or t he D W A R F specifica t ion.
I n t he following sect ions, t ext in nor ma l f ont descr ibes r equ ir ed a spect s of t he D W A R F
for m a t . T ext in it al ics is expla na t or y or supplem en t a r y m a t er ia l, a nd not pa r t of t h e
for m a t de finit ion it self .
1.3 Vendor Ex tensibility
T h is docu men t d oes n ot a t t empt t o cover a ll in t er est in g la n gua ge s or even t o cover a ll of
t he in t er est ing debu gging infor ma t ion needs f or it s pr ima r y t a r ge t la n gua ges ( C , C + + ,
F O R T R A N 77, F or t r a n90, M odu la 2, P a sca l) . T her efor e t h e documen t pr ovides vendor s a
wa y t o define t heir own debu ggin g infor ma t ion t a gs, a t t r ib u t es, ba se t ype encodin gs,
loca t ion oper a t ions, la ngu a ge na m es, ca lling conven t ions a nd ca ll fr a me in st r uct ions by
r eser ving a por t ion of t h e na m e spa ce a nd va lid va lues for t hese const r uct s for vendor
specific a d dit ions. F u t ur e ver sions of t h is docu men t will n ot use na mes or va lues r eser ved
for vendor specific a d d it ions. A ll na mes a nd va lues n ot r eser ved f or ven dor a d dit ions,
however , a r e r eser ved f or fu t ur e ver sions of t h is docu men t . See sect ion 7 for d et a ils.
1.4 Changes from Version 1
T he f ollowing is a list of t he m a jor cha nges ma de t o t he D W A R F D eb u ggin g I nfor m a t ion
F or m a t since Ver sion 1 of t he for ma t wa s pu b lished ( J a nua r y 20, 1992) . T he list is n ot
mea n t t o be exh a u st ive.
• Debu ggin g infor ma t ion en t r ies ha ve been m oved fr om t he . d e b u g t o t he
. d e b u g _ i n f o sect ion of a n object file.
• T he t a g, a t t r ibu t e na mes a nd a t t r ibu t e for ms encodin gs ha ve been moved out of t he
debu ggin g infor ma t ion it self t o a sepa r a t e a bbr evia t ions t a ble.
• E xplicit sibling point er s ha ve been ma de opt iona l. E a ch en t r y now specifies ( t hr ough
t he a b br evia t ions t a ble) whet her or not it h a s ch ildr en .
• N ew mor e compa ct a t t r ibu t e for m s ha ve been a dded , inclu ding a va r ia ble len gt h
const a n t da t a for m . A t t r ibu t e va lues ma y now h a ve a n y for m wit h in a given cla ss of
for m s.
• Loca t ion descr ip t ions ha ve been r epla ced by a new, m or e compa c t a nd mor e expr essive
for m a t . T her e is n ow a wa y of expr essing mu lt iple loca t ions for a n object whose
loca t ion ch a nges du r in g it s lif et ime .
• T her e is a new for ma t for line n u m ber infor m a t ion t ha t pr ovides infor m a t ion f or code
cont r ibu t ed t o a compila t ion u n it fr om a n inclu ded file. L ine nu m ber infor ma t ion is
now in t he . d e b u g _ l i n e sect ion of a n object file.
• T he r epr esen t a t ion of t he t ype of a decla r a t ion h a s been r ewor ked .
• A new sec t ion pr ovides a n encodin g for pr e- pr ocessor ma cr o infor m a t ion.
• Debu ggin g infor ma t ion en t r ies now pr ovide for t he r epr esent a t ion of n on-de finin g
decla r a t ions of object s, fu nct ions or t ypes.
• M or e com ple t e suppor t for M odu la 2 a nd Pa sca l ha s been a d ded.
• T her e is now a wa y of descr ib ing loca t ions for segm en t ed a d dr ess spa ces.
• A new sec t ion pr ovides a n encodin g for in for m a t ion a bout ca ll fr a me a c t iva t ions.
• T he r epr esen t a t ion of enu m er a t ion a nd a r r a y t ypes ha s been r ewor ked so t ha t D W A RF
pr esen t s only a single wa y of r epr esen t ing list s of it em s.
• S u ppor t ha s been a dded for C + + t empla t es a nd except ions.
_________________________________________________________________________________
D W _ A T _ a b s t r a c t _ o r i g i n DW_AT_accessibility
D W _ A T _ a d d r e s s _ c l a s s DW_AT_artificial
D W _ A T _ b a s e _ t y p e s DW_AT_bit_offset
D W _ A T _ b i t _ s i z e DW_AT_byte_size
D W _ A T _ c a l l i n g _ c o n v e n t i o n DW_AT_common_reference
D W _ A T _ c o m p _ d i r DW_AT_const_value
D W _ A T _ c o n t a i n i n g _ t y p e DW_AT_count
D W _ A T _ d a t a _ m e m b e r _ l o c a t i o n DW_AT_decl_column
D W _ A T _ d e c l _ f i l e DW_AT_decl_line
D W _ A T _ d e c l a r a t i o n DW_AT_default_value
D W _ A T _ d i s c r DW_AT_discr_list
D W _ A T _ d i s c r _ v a l u e DW_AT_encoding
D W _ A T _ e x t e r n a l DW_AT_frame_base
D W _ A T _ f r i e n d DW_AT_high_pc
D W _ A T _ i d e n t i f i e r _ c a s e DW_AT_import
D W _ A T _ i n l i n e DW_AT_is_optional
D W _ A T _ l a n g u a g e DW_AT_location
DW _ A T _ l o w _ p c DW_AT_lower_bound
DW _ AT _ m ac r o_ i n fo DW_AT_name
DW _ AT _ n am e li s t _i t e m DW_AT_ordering
DW _ AT _ p ri o rity DW_AT_producer
DW _ AT_pro t otyped DW_AT_return_addr
DW_AT_segment DW_AT_sibling
DW_AT_specification DW_AT_start_scope
DW_AT_static_link DW_AT_stmt_list
DW_AT_stride_size DW_AT_string_length
DW_AT_type DW_AT_upper_bound
DW_AT_use_location DW_AT_variable_parameter
DW_AT_virtuality DW_AT_visibility
DW_AT_vtable_elem_location
_________________________________________________________________________________
Figure 2. A t t r ibu t e na mes
a t t r ib u t e na me a s pa r t of t he in for ma t ion t ha t gu ides t h e in t er pr et a t ion of a debugging
infor ma t ion en t r y. A t t r ibu t e va lue for m s ma y belong t o one of t he following cla sses.
a ddr ess R efer s t o some loca t ion in t he a ddr ess spa ce of t he descr ibed pr ogr a m .
block A n a r bit r a r y nu m ber of unint er pr et ed byt es of da t a .
const a n t O ne, t wo, four or eigh t byt es of u nin t er pr et ed da t a , or da t a encoded in
t he va r ia ble lengt h for ma t kn own a s L E B128 ( see sec t ion 7.6) .
fla g A sma ll const a n t t h a t indica t es t he pr esence or a bsence of a n
a t t r ib u t e.
r efer ence R efer s t o some member of t he set of debugging infor ma t ion ent r ies
t h a t descr ibe t h e pr ogr a m. T her e a r e t wo t ypes of r efer ence. T he
fir st is a n offset r ela t ive t o t he begin ning of t he comp ila t ion u nit in
which t he r efer ence occur s a n d m u st r efer t o a n ent r y wit h in t ha t
sa me compila t ion u nit . T he second t ype of r efer ence is t he a ddr ess of
a ny deb u ggin g in for m a t ion ent r y wit h in t he sa me execu t a ble or sha r ed
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 6
-- --
Fu rt herm ore, t o m eet t h e need s of recent com p u t er arch it ect u res and op t im iz at ion
t ech niqu es , t h e d ebu gging inf orm at ion m u st be abl e t o d escribe t h e l ocat ion of an obj ect
wh ose loca t ion ch anges over t h e ob j ect ’s l if et im e.
I nfor ma t ion a b out t he loca t ion of pr ogr a m object s is pr ovided by loca t ion descr ipt ions.
Loca t ion descr ip t ions ca n be eit her of t wo for m s:
1. L oca t ion ex pressions which a r e a la ngu a ge in depen den t r epr esen t a t ion of a ddr essing
r ules of a r b it r a r y complexit y bu ilt f r om a few ba sic bu ilding blocks, or operat ions.
T hey a r e su fficient for descr ib ing t he loca t ion of a ny object a s long a s it s lifet ime is
eit her st a t ic or t he sa me a s t he lexica l block t ha t owns it , a nd it does not m ove
t h r ough ou t it s lif et im e.
2. L oca t ion l i st s which a r e u sed t o descr ibe object s t ha t ha ve a lim it ed lifet im e or
cha nge t heir loca t ion t h r ough out t h eir lif et ime. L oca t ion list s a r e mor e complet ely
descr ibed below.
T he t wo for ms a r e d ist ingu ished in a cont ext sen sit ive ma nner . A s t he va lue of a n
a t t r ib u t e, a loca t ion expr ession is encode d a s a b lock a nd a loca t ion list is encoded a s a
const a n t offset in t o a loca t ion list t a ble.
N ot e: T h e V ersion 1 concept of "locat ion d escript ions" was rep l aced in V ersion 2 wit h t h is
new abst ract ion becau se it is d enser and m ore d escri pt ive.
2.4.1 Location Ex pressions
A loca t ion expr ession con sists of zer o or mor e loca t ion oper a t ions. A n expr ession wit h zer o
oper a t ions is u sed t o denote a n object t ha t is pr esen t in t he sour ce code bu t not pr esen t in
t he object code ( per ha ps beca use of opt im iza t ion) . T he loca t ion oper a t ions fa ll in t o t wo
ca t egor ies, r egist er na mes a n d a ddr essing oper a t ions. R e gist er na mes a lwa ys a ppea r a lone
a nd indica t e t ha t t he r efer r ed object is cont a ined inside a pa r t icu la r r e gist er . A ddressing
oper a t ions a r e m em or y a ddr ess compu t a t ion r ules. A ll loca t ion oper a t ions a r e encoded a s a
st r ea m of opcodes t ha t a r e ea ch f ollowed by zer o or m or e lit er a l oper a n d s. T h e nu m ber of
oper a nds is det er mined by t h e opcode.
2.4.2 Register N ame Operators
T he f ollowing oper a t ions ca n be u sed t o na me a r egist er .
N ot e t h at t h e regi st er nu m ber represent s a DW A R F specifi c m ap ping of nu m bers ont o t h e
act u al regi st ers of a given arch it ect u re. T h e m app ing sh ou l d be ch osen t o gain op t im al
d ens i t y and sh ou l d be sh ared by al l u sers of a given arch it ect u re. T h e Program m ing
L angu ages S I G recom m end s t h at t h is m app ing be d efi ned by t h e A B I 2 au t h oring
com m it t ee f or each arch it ect u re.
1. D W _ O P _ r e g 0, D W _ O P _ r e g 1, ..., D W _ O P _ r e g 3 1
T he D W _ O P _ r e gn oper a t ions encode t he na mes of u p t o 32 r e gist er s, nu mber ed
fr om 0 t h r ough 31, inclusive. T he object a ddr essed is in r e gist er n.
___________________
2. S y st em V A p p l icat i on B ina ry I nt erf ace, consist in g of t h e gen er ic in t er fa ce a nd pr ocessor supplem en t s f or
ea ch t a r get a r ch it ect u r e.
2. DW_OP_regx
T he D W _ O P _ r e g x oper a t ion h a s a single u nsigned L E B128 lit er a l oper a nd t ha t
encodes t h e na m e of a r e gist er .
2.4.3 Addressing Operations
E a ch a ddr essing oper a t ion r epr esen t s a post fix oper a t ion on a simple st a ck ma ch ine . E a ch
elem en t of t he st a ck is t h e size of a n a ddr ess on t h e t a r ge t ma chine. T he va lue on t he top
of t he sta ck a f t er ‘‘execu t ing’’ t he loca t ion expr ession is t a ken t o be t he r esu lt ( t he addr ess
of t he object , or t h e va lu e of t h e a r r a y boun d, or t h e len gt h of a dyna mic st r ing) . I n t he
ca se of loca t ions used f or st r u ct ur e mem ber s, t h e compu t a t ion a ssum es t ha t t h e ba se
a ddr ess of t he cont a in ing st r u ct u r e ha s been pu shed on t he st a ck befor e eva lua t ion of t he
a ddr essing oper a t ion.
2.4.3 .1 Literal Encodings
T he f ollowing oper a t ions a ll pu sh a va lue ont o t he a ddr essing st a ck.
1. D W _ O P _ l i t 0, D W _ O P _ l i t 1, ..., D W _ O P _ l i t 3 1
T he D W _ O P _ l i tn oper a t ions encode t he u nsigned lit er a l va lues fr om 0 t hr ough 31,
inclu sive.
2. DW_OP_addr
T he D W _ O P _ a d d r oper a t ion h a s a single oper a n d t ha t encodes a m a ch ine a ddr ess
a nd whose size is t he size of a n a ddr ess on t he t a r get ma ch ine.
3. DW_OP_const1u
T he single oper a nd of t he D W _ O P _ c o n s t 1 u oper a t ion pr ovides a 1- byt e u nsigned
int eger const a n t .
4. DW_OP_const1s
T he single oper a nd of t he D W _ O P _ c o n s t 1 s oper a t ion pr ovides a 1- byt e signed
int eger const a n t .
5. DW_OP_const2u
T he single oper a nd of t he D W _ O P _ c o n s t 2 u oper a t ion pr ovides a 2- byt e u nsigned
int eger const a n t .
6. DW_OP_const2s
T he single oper a nd of t he D W _ O P _ c o n s t 2 s oper a t ion pr ovides a 2- byt e signed
int eger const a n t .
7. DW_OP_const4u
T he single oper a nd of t he D W _ O P _ c o n s t 4 u oper a t ion pr ovides a 4- byt e u nsigned
int eger const a n t .
8. DW_OP_const4s
T he single oper a nd of t he D W _ O P _ c o n s t 4 s oper a t ion pr ovides a 4- byt e signed
int eger const a n t .
9. DW_OP_const8u
T he single oper a nd of t he D W _ O P _ c o n s t 8 u oper a t ion pr ovides a n 8-byt e u n signed
int eger const a n t .
10. DW_OP_const8s
T he single oper a nd of t he D W _ O P _ c o n s t 8 s oper a t ion pr ovides a n 8-byt e signed
int eger const a n t .
11. DW_OP_constu
T he single oper a nd of t he D W _ O P _ c o n s t u oper a t ion pr ovides a n u nsigned L E B128
int eger const a n t .
12. DW_OP_consts
T he single oper a nd of t he D W _ O P _ c o n s t s oper a t ion pr ovides a signed L E B128
int eger const a n t .
2.4.3 .2 Register Based Addressing
T he f ollowing oper a t ions pu sh a va lue ont o t he sta ck t ha t is t he r esult of a dding t he
cont ent s of a r e gist er with a given signed offset .
1. DW_OP_fbreg
T he D W _ O P _ f b r e g oper a t ion pr ovides a signed L E B128 offset fr om t he a ddr ess
specified b y t he loca t ion descr ipt or in t he D W _ A T _ f r a m e _ b a s e a t t r ib u t e of t he
cur r ent fu n ct ion. ( T h is is t y p ical l y a "st ack point er" regist er p l u s or m inu s som e
off set . On m ore sop h is t icat ed sy st em s it m igh t be a locat ion l ist t h at ad j u st s t h e
off set accord ing t o ch anges in t h e st ack p oi nt er as t h e PC ch anges.)
2. D W _ O P _ b r e g 0, D W _ O P _ b r e g 1, ..., D W _ O P _ b r e g 3 1
T he single oper a nd of t he D W _ O P _ b r e gn oper a t ions pr ovides a signed L E B128
offset fr om t he specified r e gist er .
3. DW_OP_bregx
T he D W _ O P _ b r e g x oper a t ion h a s t wo oper a nds: a signed L E B128 offset fr om t he
specified r e gist er which is defined wit h a n u n signed L E B128 nu mber .
2.4.3 .3 S tac k Operations
T he f ollowing oper a t ions ma nipu la t e t he ‘‘loca t ion sta ck.’’ L oca t ion oper a t ions t ha t index
t he loca t ion st a ck a ssume t ha t t he t op of t h e st a ck ( m ost r ecent ly a d ded ent r y) h a s index 0.
1. DW_OP_dup
T he D W _ O P _ d u p oper a t ion d u plica t es t h e va lu e a t t h e t op of t he loca t ion st a ck.
2. DW_OP_drop
T he D W _ O P _ d r o p oper a t ion pops t h e va lu e a t t h e t op of t he st a ck.
3. DW_OP_pick
T he single oper a nd of t he D W _ O P _ p i c k oper a t ion pr ovides a 1- byt e index. T he
st a ck en t r y wit h t he specified index ( 0 t hr ough 255 , inclu sive) is pushed on t he sta ck.
4. DW_OP_over
T he D W _ O P _ o v e r oper a t ion d u plica t es t h e en t r y cur r en t ly second in t he sta ck a t
t he t op of t h e st a ck. T h is is equ iva lent t o a n D W _ O P _ p i c k oper a t ion, wit h index 1 .
5. DW_OP_swap
T he D W _ O P _ s w a p oper a t ion swa ps t he t op t wo st a ck ent r ies. T he ent r y a t t he t op
of t he sta ck becomes t h e second st a ck ent r y, a nd t he second ent r y becomes t he t op of
t he st a ck.
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 10
-- --
6. DW_OP_rot
T he D W _ O P _ r o t oper a t ion r ot a t es t he fir st t hr ee st a ck en t r ies. T h e en t r y a t t he
t op of t he st a ck becomes t he t h ir d st a ck en t r y, t h e sec ond en t r y becomes t he t op of
t he st a ck, a nd t he t hir d ent r y becomes t he second en t r y.
7. DW_OP_deref
T he D W _ O P _ d e r e f oper a t ion pops t h e t op sta ck ent r y a nd t r ea t s it a s a n a ddr ess.
T he va lue r et r ieved fr om t ha t a ddr ess is pushed . T he size of t he da t a r et r ieved fr om
t he der efer enced a ddr ess is t h e size of a n a ddr ess on t h e t a r ge t ma chine.
8. DW_OP_deref_size
T he D W _ O P _ d e r e f _ s i z e oper a t ion beh a ves like t he D W _ O P _ d e r e f oper a t ion:
it pops t he t op st a ck ent r y a nd t r ea t s it a s a n a ddr ess. T h e va lu e r et r ieved fr om t ha t
a ddr ess is pushed . I n t h e D W _ O P _ d e r e f _ s i z e oper a t ion, however , t h e size in
byt es of t he da t a r et r ieved fr om t he der efer enced a ddr ess is specified by t he single
oper a nd . T h is oper a n d is a 1- b yt e u n signed int egr a l const a n t whose va lue ma y not be
la r ger t ha n t he size of a n a ddr ess on t he t a r get ma ch ine . T he da t a r et r ieved is zer o
ext en ded t o t he size of a n a ddr ess on t he t a r get m a ch ine before bein g pu shed on t he
expr ession sta ck.
9. DW_OP_xderef
T he D W _ O P _ x d e r e f oper a t ion pr ovides a n ext ended der efer ence mecha n ism. T he
ent r y a t t he t op of t he st a ck is t r ea t ed a s a n a ddr ess. T he second st a ck en t r y is
t r ea t ed a s a n ‘‘a d dr ess spa ce iden t ifier ’’ f or t h ose a r ch it ect u r es t h a t suppor t mu lt iple
a ddr ess spa ce s. T he t op t wo st a ck elem en t s a r e popped, a da t a it em is r et r ieved
t hr ough a n implemen t a t ion- defined a ddr ess ca lcu la t ion a nd pu shed a s t he new st a ck
t op. T he size of t h e da t a r et r ieved fr om t he der efer enced a ddr ess is t he size of a n
a ddr ess on t he t a r get ma ch ine .
10. DW_OP_xderef_size
T he D W _ O P _ x d e r e f _ s i z e oper a t ion beh a ves like t he D W _ O P _ x d e r e f
oper a t ion: t he en t r y a t t he t op of t he sta ck is t r ea t ed a s a n a ddr ess. T he sec ond st ack
ent r y is t r ea t ed a s a n ‘‘a ddr ess spa ce iden t ifier ’’ for t h ose a r ch it ect ur es t hat suppor t
mu lt iple a d dr ess spa ces. T he t op t wo st a ck elemen t s a r e popped, a da t a it em is
r et r ieved t h r ough a n im plem en t a t ion-defined a ddr ess ca lcula t ion a nd pu shed a s t h e
new sta ck t op. I n t he D W _ O P _ x d e r e f _ s i z e oper a t ion, however , t h e size in byt es
of t he da t a r et r ieved fr om t he der efer enced a ddr ess is specified by t he single oper a n d .
T h is oper a nd is a 1- b yt e u n signed in t egr a l const a n t whose va lue ma y n ot be la r ger
t ha n t he size of a n a ddr ess on t he t a r get ma ch ine. T he da t a r et r ieved is zer o
ext en ded t o t he size of a n a ddr ess on t he t a r get m a ch ine before bein g pu shed on t he
expr ession sta ck.
2.4.3 .4 Arithmetic and Logical Operations
T he f ollowing pr ovide a r it h met ic a nd logica l oper a t ions. T he a r it hmet ic oper a t ions
per for m ‘‘a ddr essing a r it h m et ic,’’ t ha t is, u n signed a r it h m et ic t h a t wr a ps on a n a ddr ess-
sized boun da r y. T he oper a t ions do not ca use a n except ion on over flow.
1. DW_OP_abs
T he D W _ O P _ a b s oper a t ion pops t h e t op sta ck ent r y a nd pu shes it s a bsolut e va lue.
2. DW_OP_and
T he D W _ O P _ a n d oper a t ion pops t h e t op t wo st a ck va lues, per for ms a b it wise and
oper a t ion on t he t wo, a n d pu shes t h e r esu lt .
3. DW_OP_div
T he D W _ O P _ d i v oper a t ion pops t h e t op t wo st a ck va lues, d ivides t he for m er second
ent r y by t h e for m er t op of t he sta ck u sing signed division, a n d pu shes t he r esu lt .
4. DW_OP_minus
T he D W _ O P _ m i n u s oper a t ion pops t h e t op t wo st a ck va lues, sub t r a c t s t he f or mer
t op of t h e st a ck fr om t h e for m er second ent r y, a n d pu shes t he r esult .
5. DW_OP_mod
T he D W _ O P _ m o d oper a t ion pops t h e t op t wo st a ck va lues a n d pu shes t he r esu lt of
t he ca lcu la t ion: f or mer second st a ck en t r y m odu lo t h e for mer t op of t he sta ck.
6. DW_OP_mul
T he D W _ O P _ m u l oper a t ion pops t h e t op t wo st a ck en t r ies, mu lt iplies t h em t oget her ,
a nd pushes t he r esult .
7. DW_OP_neg
T he D W _ O P _ n e g oper a t ion pops t h e t op sta ck ent r y, a nd pu shes it s nega t ion.
8. DW_OP_not
T he D W _ O P _ n o t oper a t ion pops t h e t op sta ck ent r y, a nd pu shes it s b it wise
complement .
9. DW_OP_or
T he D W _ O P _ o r oper a t ion pops t h e t op t wo st a ck en t r ies, per for ms a b it wise or
oper a t ion on t he t wo, a n d pu shes t h e r esu lt .
10. DW_OP_plus
T he D W _ O P _ p l u s oper a t ion pops t h e t op t wo st a ck en t r ies, a dds t h em t oget her ,
a nd pushes t he r esult .
11. DW_OP_plus_uconst
T he D W _ O P _ p l u s _ u c o n s t oper a t ion pops t h e t op sta ck ent r y, a dds it t o t he
unsigned L E B128 const a n t oper a n d a nd pu shes t he r esu lt . T h is operat ion is su ppl ied
specifi cal l y t o be able t o encod e m ore fi el d off set s in t wo by t es t h an can be d one wi t h
"D W _ O P _ l i tn D W _ O P _ a d d".
12. DW_OP_shl
T he D W _ O P _ s h l oper a t ion pops t h e t op t wo st a ck en t r ies, shif t s t he for mer second
en t r y lef t b y t h e n u m ber of b it s specified b y t he f or mer t op of t he st a ck , a n d pu shes
t he r esult .
13. DW_OP_shr
T he D W _ O P _ s h r oper a t ion pops t h e t op t wo st a ck en t r ies, shif t s t he for mer second
ent r y r igh t ( logica lly) b y t he n u m ber of b it s specified by t he f or mer t op of t he st a ck,
a nd pushes t he r esult .
14. DW_OP_shra
T he D W _ O P _ s h r a oper a t ion pops t h e t op t wo st a ck en t r ies, shif t s t he for mer
second en t r y r igh t ( a r it hmet ica lly) by t he nu m ber of b it s specified by t h e for mer t op
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 12
-- --
_______________________________________________________________________________________
_____Bef ___or
__e_________________________O _______________________A_f_t_e_r__________________
__p_e_r_a_t_ion
0 17 DW_OP_dup 0 17
1 29 1 17
2 1000 2 29
_________________________________________________________________3_____________1_0__0_0_____
0 17 DW_OP_drop 0 29
1 29 1 1000
_____2_____________1_0__0_0_________________________________________________________________
0 17 DW_OP_pick 2 0 1000
1 29 1 17
2 1000 2 29
_________________________________________________________________3_____________1_0__0_0_____
0 17 DW_OP_over 0 29
1 29 1 17
2 1000 2 29
_________________________________________________________________3_____________1_0__0_0_____
0 17 DW_OP_swap 0 29
1 29 1 17
2
__________________1_0__0_0___________________________________________2_____________1_0__0_0_____
0 17 DW_OP_rot 0 29
1 29 1 1000
_____2_____________1_0__0_0___________________________________________2_____________1_7________
DW_OP_reg3
T h e val u e is in regist er 3 .
DW_OP_regx 54
T h e val u e is in regist er 5 4.
DW_OP_addr 0x80d0045c
T h e val u e of a st at ic vari able is
at m ach ine ad d ress 0x 80d 0045c.
DW_OP_breg11 44
A d d 4 4 t o t h e val u e in
regist er 11 t o get t h e ad d ress of an
au t om at ic va ri a bl e ins t ance.
DW_OP_fbreg -50
Given an D W _ A T _ f r a m e _ b a s e val u e of
"O P B R E G 3 1 6 4," t h is ex am p l e
com p u t es t h e ad d ress of a l ocal vari able
t h at is - 50 by t es f rom a l ogical f ram e
point er t h a t is com pu t ed by ad d ing
64 t o t h e cu rrent s t ack p oint er ( regi st er 31) .
DW_OP_bregx 54 3 2 DW_OP_deref
A cal l - by - ref erence param et er
wh ose ad d ress is in t h e
word 32 by t es f rom wh ere regist er
54 p oint s.
DW_OP_plus_uconst 4
A st ru ct u re m em ber is f ou r by t es
f rom t h e st a rt of t h e st ru ct u re
inst ance. T h e base ad d ress is
assu m ed t o be al read y on t h e s t ack .
1. A begin n ing a d dr ess. T h is a ddr ess is r ela t ive t o t he ba se a ddr ess of t he compila t ion
unit r ef er en cin g t h is loca t ion list . I t ma r ks t he beginning of t he a ddr ess r a nge over
which t he loca t ion is va lid.
2. A n en d in g a ddr ess, a ga in r ela t ive t o t he ba se a ddr ess of t h e compila t ion u n it
r efer encin g t h is loca t ion list . I t ma r ks t he fir st a d dr ess pa st t he end of t he a ddr ess
r a nge over which t he loca t ion is va lid.
3. A loca t ion expr ession descr ib in g t h e loca t ion of t h e object over t he r a nge specified by
t he begin n ing a n d end a ddr esses.
A ddr ess r a nges ma y over la p. W hen t hey do, t hey descr ibe a situa t ion in which a n object
exist s simu lt a neously in mor e t ha n one pla ce. I f a ll of t he a ddr ess r a nges in a given
loca t ion list do n ot collect ively cover t he ent ir e r a nge over which t he object in qu est ion is
defined , it is a ssumed t h a t t he object is not a va ila ble for t he por t ion of t he r a nge t ha t is not
cover ed .
T he end of a ny given loca t ion list is ma r ked by a 0 for t h e beginning a ddr ess a nd a 0 for
t he en d a ddr ess; n o loca t ion descr ip t ion is pr esent . A loca t ion list cont a ining only such a 0
ent r y descr ibes a n object t ha t exist s in t he sour ce code bu t n ot in t he execu t a ble pr ogr a m .
2.5 Types of D eclarations
A ny debu ggin g infor m a t ion en t r y descr ibing a decla r a t ion t ha t h a s a t ype ha s a
D W _ A T _ t y p e a t t r ib u t e, whose va lue is a r efer ence t o a n ot her deb u ggin g infor m a t ion
ent r y. T he ent r y r efer enced m a y descr ibe a ba se t ype, t ha t is, a t ype t ha t is not de fined in
t er m s of ot h er da t a t ypes, or it ma y descr ibe a user -defined t ype , such a s a n a r r a y,
st r uc t u r e or en u m er a t ion. A lt er na t ively, t he en t r y r efer enced ma y descr ibe a t ype m odifier :
const a n t , pa cked , point er , r efer ence or vola t ile , which in t ur n will r efer ence a not h er en t ry
descr ibing a t ype or t ype m odifier ( u sing a D W _ A T _ t y p e a t t r ib u t e of it s own) . See
sect ion 5 for descr ipt ions of t he en t r ies descr ib ing ba se t ypes, user -defined t ypes a n d t ype
modifier s.
2.6 Acces sibility of Declarations
S om e langu ages, not ably C+ + and A d a, h ave t h e concept of t h e access ibil it y of an obj ect
or of som e ot h er p rogram ent i t y . T h e accessi bi l it y specifi es wh ich classes of ot h er
program obj ect s are perm it t ed access t o t h e obj ect in qu est ion.
T he a cce ssibilit y of a decla r a t ion is r epr esen t ed by a D W _ A T _ a c c e s s i b i l i t y
a t t r ib u t e, whose va lue is a const a n t dr a wn fr om t he set of codes list ed in F igur e 3.
_______________________________
DW_ACCESS_public
DW_ACCESS_private
__D_W
____A__C_C
__E_S
__S__
__p_r
__o_t
__e_c
__t_e
__d__
Figure 3. Accessib ilit y codes
2.7 Visibility of Declarations
M od u l a2 h as t h e concept of t h e visibil it y of a d eclara t ion. T h e visibil it y specifi es wh ich
declarat ions are t o be v is ibl e ou t sid e of t h e m od u le in wh ich t h ey are d eclared .
T he visib ilit y of a decla r a t ion is r epr esen t ed by a D W _ A T _ v i s i b i l i t y a t t r ib u t e,
whose va lu e is a const a nt dr a wn fr om t he set of codes listed in F igu r e 4.
_ _________________________
DW_VIS_local
DW_VIS_exported
_ D
__W__
__V_I
__S__
__q_u
__a_l
__i_f
__i_e
__d__
Figure 4. Visib ilit y codes
2.8 Virtuality of Dec larations
C+ + provid es f or virt u al and pu re virt u a l st ru ct u re or class m em ber f u nct ions and f or
virt u al base classes.
T he vir t ua lit y of a decla r a t ion is r epr esen t ed by a D W _ A T _ v i r t u a l i t y a t t r ib u t e,
whose va lu e is a const a nt dr a wn fr om t he set of codes listed in F igu r e 5.
_ ________________________________________
DW_VIRTUALITY_none
DW_VIRTUALITY_virtual
_ D
__W__
__V_I
__R_T
__U_A
__L_I
__T_Y
____p
__u_r
__e__
__v_i
__r_t __l__
__u_a
Figure 5. Vir t u a lit y codes
2.9 Artificial Entries
A com p iler m ay wish t o generat e d ebu gging inf orm at ion ent ries f or obj ect s or t y pes t h at
were not act u al l y declared in t h e sou rce of t h e app l icat ion. A n ex am p le is a f orm al
param et er ent ry t o rep resent t h e h id d en t h i s param et er t h at m ost C + +
im p lem ent at ions pass as t h e fi rs t argu m ent t o non- st at ic m em ber f u nct ions .
A ny debu ggin g infor m a t ion en t r y r epr esen t in g t he decla r a t ion of a n object or t ype
a r t ificia lly gener a t ed b y a compiler a nd n ot explicit ly decla r ed by t he sour ce pr ogr a m ma y
ha ve a D W _ A T _ a r t i f i c i a l a t t r ib u t e. T he va lue of t h is a t t r ibu t e is a fla g.
2.10 Target-S pecific Addressing Information
I n som e sy s t em s, ad d resses are specifi ed as off set s wit h in a given segm ent ra t h er t h an as
locat ions wit h in a singl e fl at ad d res s space.
A ny debu ggin g infor m a t ion en t r y t ha t cont a in s a descr ipt ion of t he loca t ion of a n object or
subr ou t ine ma y h a ve a D W _ A T _ s e g m e n t a t t r ib u t e, whose va lue is a loca t ion descr ipt ion.
T he descr ipt ion eva lua t es t o t he segmen t va lue of t he it em bein g descr ibed . I f t he ent r y
cont a ining t he D W _ A T _ s e g m e n t a t t r ib u t e ha s a D W _ A T _ l o w _ p c or
D W _ A T _ h i g h _ p c a t t r ib u t e, or a loca t ion descr ipt ion t ha t eva lua t es t o a n a ddr ess, t hen
t h ose va lues r epr esen t t he offset por t ion of t he a ddr ess wit h in t he segm en t specified by
D W _ A T _ s e g m e n t.
I f a n ent r y h a s no D W _ A T _ s e g m e n t a t t r ib u t e, it inher it s t he segm en t va lue fr om it s
pa r ent en t r y. I f none of t he en t r ies in t he ch a in of pa r en t s for t h is en t r y ba ck t o it s
cont a ining compila t ion u n it en t r y ha ve D W _ A T _ s e g m e n t a t t r ib u t es, t hen t h e en t r y is
a ssumed t o exist wit h in a fla t a ddr ess spa ce. S im ila r ly, if t he en t r y ha s a
D W _ A T _ s e g m e n t a t t r ib u t e cont a in ing a n em pt y loca t ion descr ipt ion, t ha t en t r y is
a ssumed t o exist wit h in a fla t a ddr ess spa ce.
S om e sy st em s su pport d iff erent classes of ad d res ses . T h e ad d ress cl as s m ay aff ect t h e
way a point er is d eref erenced or t h e way a su brou t ine is cal l ed .
A ny debu ggin g infor m a t ion en t r y r epr esen t in g a point er or r efer ence t ype or a subr ou t ine
or su br out ine t ype ma y ha ve a D W _ A T _ a d d r e s s _ c l a s s a t t r ib u t e, whose va lue is a
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 17
-- --
block s t o any d ep t h .
A lexica l b lock is r epr esen t ed by a deb u gging infor m a t ion ent r y wit h t h e t a g
D W _ T A G _ l e x i c a l _ b l o c k.
T he lexica l block en t r y ha s a D W _ A T _ l o w _ p c a t t r ib u t e whose va lue is t he r eloca t ed
a ddr ess of t he fir st ma chine in st r uct ion ge ner a t ed for t he lexica l b lock . T h e lexica l b lock
ent r y a lso h a s a D W _ A T _ h i g h _ p c a t t r ib u t e whose va lue is t he r eloca t ed a ddr ess of t he
fir st loca t ion pa st t he la st ma chine inst r uct ion gener a t ed for t he lexica l b lock .
I f a na me ha s been given t o t he lexica l block in t h e sour ce pr ogr a m , t hen t he cor r espond ing
lexica l block en t r y ha s a D W _ A T _ n a m e a t t r ib u t e whose va lue is a nu ll-t er m ina t ed st r in g
cont a ining t he na me of t he lexica l b lock a s it a ppea r s in t he sour ce pr ogr a m .
T h is is not t h e sam e as a C or C + + l abel ( see bel ow) .
T he lexica l block en t r y owns debu ggin g infor ma t ion en t r ies t ha t descr ibe t he decla r a t ions
wit h in t ha t lexica l b lock. T her e is one such debu ggin g infor ma t ion en t r y for ea ch loca l
decla r a t ion of a n iden t ifier or inner lexica l block.
3.5 Label Entries
A l abel is a way of id ent i f y ing a sou rce st at em ent . A l abeled s t at em ent is u su al l y t h e
t arget of one or m ore ‘‘go t o’’ st at em ent s.
A la bel is r epr esen t ed b y a deb u ggin g infor m a t ion en t r y wit h t he t a g D W _ T A G _ l a b e l.
T he ent r y f or a la b el sh ould be owned by t h e deb u ggin g infor ma t ion en t r y r epr esen t ing t he
scope wit h in which t he na me of t he la bel could be lega lly r efer enced wit hin t h e sour ce
pr ogr a m .
T he la bel ent r y ha s a D W _ A T _ l o w _ p c a t t r ib u t e whose va lue is t he r eloca t ed a ddr ess of
t he fir st ma ch ine inst r u ct ion gener a t ed for t he st a t em en t ident ified by t h e la bel in t he
sour ce pr ogr a m . T he la bel en t r y a lso ha s a D W _ A T _ n a m e a t t r ib u t e whose va lue is a
nu ll- t er m ina t ed st r ing cont a ining t he na me of t he la b el a s it a ppea r s in t h e sour ce pr ogr a m .
3.6 With S tatement Entries
B ot h Pascal and M od u l a su p port t h e concept of a ‘‘wit h ’’ st at em ent . T h e wit h st at em ent
specifi es a sequ ence of ex ecu t able s t at em ent s wit h in wh ich t h e fi eld s of a record vari able
m ay be ref erenced , u nq u al ifi ed by t h e nam e of t h e record variabl e.
A wit h st a t emen t is r epr esen t ed by a debu ggin g infor ma t ion en t r y wit h t he t a g
D W _ T A G _ w i t h _ s t m t. A with st a t em en t en t r y ha s a D W _ A T _ l o w _ p c a t t r ib u t e
whose va lu e is t h e r eloca t ed a ddr ess of t he fir st ma ch ine in st r uct ion gener a t ed for t he b ody
of t he wit h sta t em en t . A wit h sta t em en t en t r y a lso ha s a D W _ A T _ h i g h _ p c a t t r ib u t e
whose va lu e is t h e r eloca t ed a ddr ess of t he fir st loca t ion a f t er t he la st ma chine inst r uct ion
gener a t ed f or t he body of t he sta t em en t .
T he wit h st a t ement en t r y ha s a D W _ A T _ t y p e a t t r ib u t e, den ot ing t he t ype of r ecor d
whose field s ma y be r efer enced wit hout f u ll qua lifica t ion wit h in t he b ody of t he st a t em en t .
I t a lso ha s a D W _ A T _ l o c a t i o n a t t r ib u t e, descr ib ing h ow t o find t he ba se a ddr ess of t h e
r ecor d object r efer enced wit h in t he body of t he wit h st a t ement .
float x = 99.99;
int myfunc()
{
float f = x;
float x = 88.99;
return 0 ;
}
A N S I - C scoping ru les requ ire t h at t h e val u e of t h e variabl e x assigned t o t h e
variable f in t h e init ial iz at ion sequence is t h e va l u e of t h e global variable x,
rat h er t h an t h e l ocal x, becau se t h e scope of t h e loca l variable x onl y s t art s af t er
t h e f u l l d ecl arat or f or t h e loca l x.
4.2 Common Block Entries
A F or t r a n com m on block ma y be descr ibed by a debu ggin g infor ma t ion ent r y wit h t he t a g
D W _ T A G _ c o m m o n _ b l o c k. T he comm on b lock en t r y ha s a D W _ A T _ n a m e a t t r ib u t e
whose va lu e is a n u ll- t er m ina t ed st r ing c ont a in ing t h e common b lock na me a s it a ppea r s in
t he sour ce pr ogr a m . I t a lso ha s a D W _ A T _ l o c a t i o n a t t r ib u t e whose va lue descr ibes
t he loca t ion of t he begin ning of t he comm on block. T h e common block en t r y owns
debu ggin g infor ma t ion en t r ies descr ib in g t he va r ia bles cont a ined wit hin t he common b lock .
4.3 Imported Declaration Entries
S om e langu ages su p p ort t h e concept of im port ing int o a given m od u le d eclarat ions m ad e
in a d iff erent m od u le.
A n impor t ed decla r a t ion is r epr esen t ed b y a debugging infor m a t ion en t r y wit h t he t a g
D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n. T he en t r y f or t he impor t ed decla r a t ion ha s a
D W _ A T _ n a m e a t t r ib u t e whose va lue is a nu ll-t er m ina t ed st r in g cont a ining t he na me of
t he en t it y whose decla r a t ion is bein g im por t ed a s it a ppea r s in t he sour ce pr ogr a m . T he
impor t ed decla r a t ion ent r y a lso ha s a D W _ A T _ i m p o r t a t t r ib u t e, whose va lue is a
r efer ence t o t he deb u gging infor ma t ion ent r y r epr esent ing t he decla r a t ion t h a t is being
im por t ed .
4.4 N amelist Entries
A t lea st one langu age, Fort ra n90, h as t h e concept of a nam el ist . A nam el ist is an ord ered
list of t h e nam es of som e set of declared obj ect s. T h e nam el ist obj ect it sel f m ay be u sed
as a rep l acem ent f or t h e l ist of nam es in variou s cont ex t s.
A na melist is r epr esen t ed by a debu ggin g infor ma t ion en t r y wit h t he t a g
D W _ T A G _ n a m e l i s t. I f t he na me list it self ha s a na me, t he na me list en t r y ha s a
D W _ A T _ n a m e a t t r ib u t e, whose va lue is a nu ll-t er mina t ed st r in g cont a ining t he na me list’s
na me a s it a ppea r s in t he sour ce pr ogr a m .
E a ch na me t ha t is pa r t of t he na me list is r epr esen t ed by a deb u ggin g infor ma t ion ent r y
wit h t he t a g D W _ T A G _ n a m e l i s t _ i t e m. E a ch such en t r y is a ch ild of t h e na m elist
ent r y, a nd a ll of t h e na m elist it em en t r ies f or a given na melist a r e or der ed a s wer e t he list
of na mes t h ey cor r espond t o in t he sour ce pr ogr a m .
5. TYP E EN TRIES
T h is sect ion pr esen t s t h e deb u ggin g infor ma t ion en t r ies t h a t descr ibe pr ogr a m t ypes: ba se
t ypes, m odified t ypes a nd user -defined t ype s.
I f t he scope of t he decla r a t ion of a na med t ype begins somet ime a f t er t he low pc va lue for
t he scope m ost closely enclosing t h e decla r a t ion, t he decla r a t ion ma y h a ve a
D W _ A T _ s t a r t _ s c o p e a t t r ib u t e. T he va lue of t h is a t t r ibu t e is t he offset in byt es of
t he begin n ing of t he scope for t he decla r a t ion fr om t he low pc va lu e of t he debu ggin g
infor ma t ion en t r y t ha t defines it s scope.
5.1 Base Type Entries
A base t y pe is a d at a t y pe t h at is not d efi ned in t erm s of ot h er d at a t y p es. E ach
program m ing l angu age h as a set of base t y pes t h at are cons id ered t o be bu il t int o t h at
langu age.
A ba se t ype is r epr esen t ed by a debu ggin g infor ma t ion en t r y wit h t he t a g
D W _ T A G _ b a s e _ t y p e. A ba se t ype en t r y ha s a D W _ A T _ n a m e a t t r ib u t e whose va lue
is a nu ll-t er mina t ed st r ing descr ib ing t he na me of t he ba se t ype a s r ecognized b y t he
pr ogr a m m ing la ngu a ge of t h e compila t ion u n it cont a ining t he ba se t ype en t r y.
A ba se t ype en t r y a lso h a s a D W _ A T _ e n c o d i n g a t t r ib u t e descr ib ing h ow t he ba se t ype
is encoded a nd is t o be in t er pr e t ed . T he va lue of t h is a t t r ibu t e is a const a n t . The set of
va lues a nd t heir mea n ings for t he D W _ A T _ e n c o d i n g a t t r ib u t e is given in F igur e 10.
_________________________________________________________________
__N __a_m__e____________________________M ___e_a_n_in__g______________________
DW_ATE_address linea r ma chine a ddr ess
DW_ATE_boolean t r ue or fa lse
DW_ATE_complex_float complex floa t ing-point nu m ber
DW_ATE_float floa t ing- point nu mber
DW_ATE_signed signed bina r y in t eger
DW_ATE_signed_char signed cha r a ct er
DW_ATE_unsigned u n signed b ina r y int ege r
__D__W____A_T__E____u_n__s_i__g_n__e_d____c__h_a__r____u__n_sign ______________
___e_d__c_h_a__r a__c_t er
Figure 10. E ncoding a t t r ibu t e va lues
A ll encodings a ssum e t he r epr esen t a t ion t ha t is ‘‘nor ma l’’ f or t he t a r ge t a r ch it ec t u r e.
A ba se t ype en t r y ha s a D W _ A T _ b y t e _ s i z e a t t r ib u t e, whose va lue is a const a n t ,
descr ibing t he size in b yt es of t he st ora ge u nit u sed t o r epr esen t a n object of t he given t ype .
I f t he va lue of a n object of t he given t ype does not fu lly occu py t he st or a ge u n it descr ibed
by t h e byt e size a t t r ibu t e, t he ba se t ype ent r y ma y ha ve a D W _ A T _ b i t _ s i z e a t t r ib u t e
a nd a D W _ A T _ b i t _ o f f s e t a t t r ib u t e, b ot h of whose va lues a r e const a nt s. T he b it size
a t t r ib u t e descr ibes t he a ct ua l size in bit s u sed t o r epr esen t a va lue of t he given t ype . T he
bit offset a t t r ibu t e descr ibes t he offset in bit s of t he h igh or der b it of a va lue of t he given
t ype f r om t he h igh or der b it of t he st ora ge u nit u sed t o cont a in t ha t va lue.
For ex am p l e, t h e C t y pe i n t on a m ach ine t h at u ses 32- bi t int egers wou l d be represent ed
by a base t y pe ent ry wit h a nam e at t ri bu t e wh ose va l u e was ‘‘i n t,’’ an encod ing at t ribu t e
wh ose val u e was D W _ A T E _ s i g n e d and a by t e siz e at t ribu t e wh ose val u e was 4.
I f t he debu ggin g infor ma t ion en t r y for a t ypedef r epr esen t s a decla r a t ion of t he t ype t hat is
not a lso a de finit ion, it d oes n ot cont a in a t ype a t t r ibu t e .
5.4 Array Type Entries
M any l angu ages sh are t h e concept of an ‘‘array ,’’ wh ich is a t abl e of com ponent s of
id ent ical t y pe.
A n a r r a y t ype is r epr esen t ed b y a debugging infor ma t ion en t r y wit h t he t a g
D W _ T A G _ a r r a y _ t y p e.
I f a na me ha s been given t o t he a r r a y t ype in t he sour ce pr ogr a m , t hen t he cor r espond ing
a r r a y t ype ent r y h a s a D W _ A T _ n a m e a t t r ib u t e whose va lue is a nu ll-t er m ina t ed st r in g
cont a ining t he a r r a y t ype na m e a s it a ppea r s in t h e sour ce pr ogr a m .
T he a r r a y t ype en t r y descr ib ing a m u lt idimen siona l a r r a y m a y ha ve a
D W _ A T _ o r d e r i n g a t t r ib u t e whose const a nt va lue is in t er pr e t ed t o mea n eit her r ow-
ma jor or colum n-ma jor or der ing of a r r a y element s. T he set of va lues a n d t heir mea n ings
for t h e or der ing a t t r ibu t e a r e listed in F igu r e 12. I f no or der in g a t t r ibu t e is pr esen t, t he
defa u lt or der ing f or t he sour ce la n gua ge ( which is indica t ed by t h e D W _ A T _ l a n g u a g e
a t t r ib u t e of t he en closing compila t ion u n it en t r y) is a ssumed.
_ _________________________
DW_ORD_col_major
W_ORD_row_major
_ D
_________________________
Figure 12. A r r a y or der ing
T he or der ing a t t r ibu t e ma y opt iona lly a ppea r on one-dimensiona l a r r a ys; it will be ignor ed.
A n a r r a y t ype en t r y ha s a D W _ A T _ t y p e a t t r ib u t e descr ib ing t he t ype of ea ch elem en t of
t he a r r a y.
I f t he a m ount of st or a ge a lloca t ed t o hold ea ch elem en t of a n object of t he given a r r a y t ype
is d iffer en t fr om t he a m ou n t of st or a ge t h a t is n or m a lly a lloca t ed t o h old a n in d ividu a l
object of t h e indica t ed elem ent t ype, t hen t he a r r a y t ype en t r y ha s a
D W _ A T _ s t r i d e _ s i z e a t t r ib u t e, whose const a nt va lue r epr esen t s t he size in bit s of
ea ch element of t he a r r a y.
I f t he size of t he en t ir e a r r a y ca n be de t er m ined st a t ica lly a t comp ile t ime, t he a r r ay t ype
ent r y ma y h a ve a D W _ A T _ b y t e _ s i z e a t t r ib u t e, whose const a nt va lue r epr esen t s t he
t ota l size in byt es of a n inst a nce of t h e a r r a y t ype.
N ot e t h at if t h e siz e of t h e array can be d et erm ined st at ical l y at com pile t im e, t h is val u e
can u su al l y be com pu t ed by m u l t ip l y ing t h e nu m ber of array elem ent s by t h e siz e of each
elem ent .
E a ch a r r a y dimen sion is descr ibed by a debu gging infor ma t ion en t r y with eit her t he ta g
D W _ T A G _ s u b r a n g e _ t y p e or t he t a g D W _ T A G _ e n u m e r a t i o n _ t y p e. T hese
ent r ies a r e childr en of t h e a r r a y t ype en t r y a nd a r e or der ed t o r eflect t he a ppea r a nce of t he
dimensions in t h e sour ce pr ogr a m ( i.e. lef t m ost dimension fir st , next t o lef t m ost sec ond , a nd
so on) .
I n l angu ages, su ch as A N S I - C, in wh ich t h ere is no concept of a ‘‘m u l t id im ens iona l
array ,’’ an array of array s m ay be represent ed by a d ebu gging inf orm at ion ent ry f or a
m u l t id im ensional array .
ha ve a D W _ A T _ d e c l a r a t i o n a t t r ib u t e.
5.5.2 Derived Classes and Structures
T he cla ss t ype or st r u ct ur e t ype en t r y t ha t descr ibes a der ived cla ss or st r u ct ur e owns
debu ggin g infor ma t ion en t r ies descr ib in g ea ch of t he cla sses or st r uct u r es it is der ived
fr om , or der ed a s t hey wer e in t he sou r ce pr ogr a m . E a ch such en t r y ha s t h e t a g
D W _ T A G _ i n h e r i t a n c e.
A n inher it a nce ent r y ha s a D W _ A T _ t y p e a t t r ib u t e whose va lue is a r efer ence t o t he
debu ggin g infor ma t ion en t r y descr ibing t he st r uct u r e or cla ss fr om which t he pa r en t
st r u c t u r e or cla ss of t he inher it a nce en t r y is der ived . I t a lso h a s a
D W _ A T _ d a t a _ m e m b e r _ l o c a t i o n a t t r ib u t e, whose va lue is a loca t ion descr ipt ion
descr ibing t he loca t ion of t he begin ning of t he da t a member s cont r ibu t ed t o t h e ent ir e cla ss
by t h is su b object r ela t ive t o t h e beginning a ddr ess of t he da t a mem ber s of t he ent ir e cla ss.
A n inher it a nce ent r y m a y ha ve a D W _ A T _ a c c e s s i b i l i t y a t t r ib u t e. I f no
a ccessib ilit y a t t r ibu t e is pr esen t , pr iva t e a ccess is a ssum ed . I f t he st r uct ur e or cla ss
r efer enced by t he inher it a nce en t r y ser ves a s a vir t ua l ba se cla ss, t h e inher it a nce en t r y ha s
a D W _ A T _ v i r t u a l i t y a t t r ib u t e.
I n C + + , a d erived class m ay cont ain access d eclara t ions t h at ch ange t h e accessibil it y of
ind ivid u al class m em bers f rom t h e overa l l accessi bi l it y specifi ed by t h e inh erit ance
declarat ion. A single access d eclarat ion m ay ref er t o a set of overl oad ed nam es.
I f a der ived cla ss or st r u ct ur e cont a ins a ccess decla r a t ions, ea ch such decla r a t ion ma y be
r epr esent ed by a deb u ggin g infor m a t ion en t r y wit h t he ta g
D W _ T A G _ a c c e s s _ d e c l a r a t i o n. E a ch such en t r y is a ch ild of t h e st r u ct ur e or
cla ss t ype ent r y.
A n a ccess decla r a t ion ent r y h a s a D W _ A T _ n a m e a t t r ib u t e, whose va lue is a nu ll-
t er m ina t ed st r ing r epr esen t ing t he na me used in t he decla r a t ion in t he sour ce progr a m ,
inclu ding a ny cla ss or st r uct u r e qua lifier s.
A n a ccess decla r a t ion ent r y a lso ha s a D W _ A T _ a c c e s s i b i l i t y a t t r ib u t e descr ib ing
t he decla r ed a ccessib ilit y of t he na med en t it ies.
5.5.3 Friends
E a ch ‘‘fr iend’’ decla r ed by a str uct ur e, u n ion or cla ss t ype m a y be r epr esen t ed by a
debu ggin g infor ma t ion en t r y t ha t is a ch ild of t h e st r uc t u r e, union or cla ss t ype en t r y; t he
fr ien d en t r y ha s t h e t a g D W _ T A G _ f r i e n d .
A fr iend en t r y ha s a D W _ A T _ f r i e n d a t t r ib u t e, whose va lue is a r efer ence t o t he
debu ggin g infor ma t ion en t r y descr ibing t he decla r a t ion of t he fr ien d .
5.5.4 Structure Data Member Entries
A da t a member ( a s opposed t o a member funct ion) is r epr esen t ed b y a debu gging
infor ma t ion en t r y wit h t he t a g D W _ T A G _ m e m b e r. T he mem ber en t r y for a na med
mem ber ha s a D W _ A T _ n a m e a t t r ib u t e whose va lue is a nu ll-t er m ina t ed st r in g cont a ining
t he m em ber na m e a s it a ppea r s in t he sour ce pr ogr a m . I f t he mem ber en t r y descr ibes a
C + + a n onym ous u n ion, t h e n a m e a t t r ibu t e is omit t ed or c onsist s of a single zer o byt e .
struct S {
int j:5;
int k:6;
int m:5;
int n:8;
};
I n bot h cas es, t h e l ocat ion d escrip t ions f or t h e d ebu gging inf orm at ion ent ries f or j, k,
m and n d escribe t h e ad d ress of t h e sam e 32- bit word t h at cont ains a l l t h ree m em bers .
( I n t h e big- end ian case, t h e l ocat ion d escrip t ion ad d resses t h e m ost signifi cant by t e, in t h e
l it t le- end ian cas e, t h e l eas t signifi cant ) . T h e f ol l owi ng d iagram sh ows t h e st ru ct u re l ay ou t
and l i st s t h e bit off set s f or each cas e. T h e off set s are f rom t h e m os t signifi cant bi t of t h e
obj ect ad d ressed by t h e locat ion d escript ion.
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 42
-- --
D W _ T A G _ t e m p l a t e _ t y p e _ p a r a m e t e r. E a ch such en t r y ha s a
D W _ A T _ n a m e a t t r ib u t e, whose va lue is a nu ll-t er mina t ed st r in g cont a in in g t he
na me of t he for m a l t ype pa r a met er a s it a ppea r s in t he sour ce pr ogr a m . T he
t em pla t e t ype pa r a met er en t r y a lso ha s a D W _ A T _ t y p e a t t r ib u t e descr ib ing t he
a ct ua l t ype by which t h e for m a l is r epla ced for t h is in st a n t ia t ion.
2. E a ch for ma l pa r a met er ized va lu e decla r a t ion a ppea r ing in t he t em pla t ed d efin it ion is
r epr esent ed by a deb u ggin g infor m a t ion en t r y wit h t he ta g
D W _ T A G _ t e m p l a t e _ v a l u e _ p a r a m e t e r. E a ch such en t r y ha s a
D W _ A T _ n a m e a t t r ib u t e, whose va lue is a nu ll-t er mina t ed st r in g cont a in in g t he
na me of t he for m a l va lu e pa r a met er a s it a ppea r s in t he sour ce pr ogr a m . T he
t em pla t e va lu e pa r a m e t er en t r y a lso ha s a D W _ A T _ t y p e a t t r ib u t e descr ib ing t he
t ype of t he pa r a m et er ized va lue. F ina lly, t he t empla t e va lue pa r a met er ent r y ha s a
D W _ A T _ c o n s t _ v a l u e a t t r ib u t e, whose va lue is t he a ct ua l const a nt va lue of t he
va lue pa r a met er f or t h is inst a nt ia t ion a s r epr esen t ed on t he t a r ge t a r ch it ec t ur e.
3. I f t he compiler ha s ge ner a t ed a specia l compila t ion unit t o hold t he t empla t e
inst a nt ia t ion a nd t ha t compila t ion unit ha s a d iffer en t na me fr om t he compila t ion
unit cont a ining t he t em pla t e definit ion, t he na me a t t r ibu t e f or t he debu ggin g ent r y
r epr esen t ing t ha t compila t ion u n it should be empt y or omit t ed .
4. I f t he cla ss t ype en t r y r epr esen t in g t he t empla t e in st a n t ia t ion or a ny of it s child
ent r ies cont a in decla r a t ion coor dina t e a t t r ibu t es, t h ose a t t r ibu t es should r efer t o t he
sour ce for t he t em pla t e definit ion, n ot t o a ny sour ce ge ner a t ed a r t ificia lly by t h e
compiler .
5.5.7 Variant Entries
A va r ia n t pa r t of a st r uct ur e is r epr esen t ed by a debu gging infor ma t ion ent r y wit h t he t a g
D W _ T A G _ v a r i a n t _ p a r t a nd is owned by t he cor r esponding str uct ur e t ype en t r y.
I f t he va r ia n t pa r t ha s a discr imina n t , t he discr im ina n t is r epr esen t ed by a sepa r a t e
debu ggin g infor ma t ion en t r y which is a ch ild of t he va r ia n t pa r t en t r y. T h is en t r y h a s t he
for m of a st r uct ur e da t a mem ber en t r y. T h e va r ia nt pa r t en t r y will h a ve a
D W _ A T _ d i s c r a t t r ib u t e whose va lue is a r efer ence t o t he mem ber en t r y for t he
discr imina nt .
I f t he va r ia n t pa r t does n ot ha ve a discr im ina n t ( t a g field) , t he va r ia nt pa r t en t r y ha s a
D W _ A T _ t y p e a t t r ib u t e t o r epr esen t t h e t a g t ype .
E a ch va r ia nt of a pa r t icula r va r ia n t pa r t is r epr esen t ed by a debu gging infor ma t ion en t r y
wit h t he t a g D W _ T A G _ v a r i a n t a nd is a ch ild of t h e va r ia nt pa r t en t r y. T he va lue t ha t
select s a given va r ia n t ma y be r epr esen t ed in one of t h r ee wa ys. T h e va r ia nt en t r y ma y
ha ve a D W _ A T _ d i s c r _ v a l u e a t t r ib u t e whose va lue r epr esen t s a single ca se la bel. T he
va lue of t h is a t t r ib u t e is encoded a s a n L E B128 n u m ber . T he nu m ber is signed if t he t a g
t ype f or t he va r ia nt pa r t cont a ining t h is va r ia nt is a signed t ype . T h e nu m ber is u nsigned
if t he t a g t ype is a n u n signed t ype .
A lt er na t ively, t h e va r ia nt en t r y ma y cont a in a D W _ A T _ d i s c r _ l i s t a t t r ib u t e, whose
va lue r epr esen t s a list of discr imina nt va lues. T h is list is r epr esen t ed by a ny of t he block
for m s a nd ma y cont a in a m ixt ur e of ca se la bels a nd la bel r a nges. E a ch it em on t he list is
pr efixed with a discr im ina n t va lue descr ipt or t h a t det er m ines whet her t he list it em
r epr esen t s a single la be l or a la bel r a nge . A single ca se la bel is r epr esen t ed a s a n L E B128
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 44
-- --
I f t he subr out ine t ype descr ibes a fu nct ion t ha t r et ur ns a va lu e, t hen t he subr out ine type
ent r y ha s a D W _ A T _ t y p e a t t r ib u t e t o denot e t he t ype r et ur ned by t he subr out ine . I f t he
t ypes of t he a r gu men t s a r e necessa r y t o descr ibe t he su br out ine t ype , t hen t he
corr esponding subr out ine t ype en t r y owns deb u ggin g in f or m a t ion en t r ies t h a t descr ibe t he
a r gu men t s. T hese debu ggin g infor ma t ion en t r ies a ppea r in t he or der t h a t t he
corr esponding a r gu m ent t ypes a ppea r in t he sour ce pr ogr a m .
I n A N S I - C t here is a d iff erence bet ween t h e t y pes of f u nct ions d eclared u sing f u nct ion
prot ot y pe s t y le d eclara t ions and t h ose d eclared u sing non- prot ot y pe d eclarat ions.
A subr out ine en t r y decla r ed wit h a funct ion pr otot ype st yle decla r a t ion ma y h a ve a
D W _ A T _ p r o t o t y p e d a t t r ib u t e, whose va lue is a fla g.
E a ch debu ggin g infor ma t ion en t r y owned by a subr out ine t ype en t r y ha s a t a g whose va lue
ha s one of t wo possible int er pr et a t ions.
1. E a ch deb u ggin g infor m a t ion en t r y t ha t is owned by a subr ou t ine t ype en t r y a nd t h a t
defines a single a r gu m ent of a specific t ype ha s t he ta g
D W _ T A G _ f o r m a l _ p a r a m e t e r.
T he f or ma l pa r a met er ent r y h a s a t ype a t t r ibu t e t o den ot e t he t ype of t he
corr esponding for m a l pa r a m et er .
2. T h e u nspecified pa r a met er s of a va r ia b le pa r a met er list a r e r epr esen t ed by a
debu ggin g infor ma t ion en t r y owned by t he subr out ine t ype en t r y wit h t he t a g
D W _ T A G _ u n s p e c i f i e d _ p a r a m e t e r s.
5.8 S tring Type Entries
A ‘‘st ring’’ is a sequ ence of ch aract ers t h at h ave specifi c sem ant ics and operat ions t h at
separat e t h em f rom array s of ch ara cters . Fort ran is one of t h e l angu ages t h at h as a s t ring
t y pe.
A st r ing t ype is r epr esen t ed b y a debuggin g infor m a t ion en t r y wit h t he t a g
D W _ T A G _ s t r i n g _ t y p e. I f a na me h a s been given t o t h e st r in g t ype in t he sour ce
pr ogr a m , t hen t h e cor r esponding st r ing t ype en t r y ha s a D W _ A T _ n a m e a t t r ib u t e whose
va lue is a nu ll-t er mina t ed st r ing cont a in ing t he str ing t ype na me a s it a ppea r s in t he sour ce
pr ogr a m .
T he str ing t ype en t r y m a y ha ve a D W _ A T _ s t r i n g _ l e n g t h a t t r ib u t e whose va lue is a
loca t ion descr ipt ion yield in g t he loca t ion wher e t he len gt h of t he st r ing is st or ed in t h e
pr ogr a m . T he st r ing t ype en t r y ma y a lso h a ve a D W _ A T _ b y t e _ s i z e a t t r ib u t e, whose
const a n t va lue is t he size in b yt es of t he da t a t o be r et r ieved fr om t he loca t ion refer enced
by t h e st r in g lengt h a t t r ibu t e. I f no b yt e size a t t r ibu t e is pr esen t , t he size of t he da t a t o be
r et r ieved is t he sa me a s t he size of a n a ddr ess on t he t a r get ma ch ine.
I f no str ing len gt h a t t r ib u t e is pr esen t , t he str ing t ype ent r y m a y ha ve a
D W _ A T _ b y t e _ s i z e a t t r ib u t e, whose const a nt va lue is t h e len gt h in b yt es of t he st r ing.
5.9 S et Entries
Pascal provid es t h e concept of a ‘‘set ,’’ wh ich represent s a grou p of val u es of ord inal t y p e.
A set is r epr esen t ed by a debu ggin g infor ma t ion en t r y wit h t he t a g
D W _ T A G _ s e t _ t y p e. I f a na me h a s been given t o t h e set t ype , t hen t he set t ype en t r y
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 46
-- --
5. d e f a u l t _ i s _ s t m t ( u byt e)
T he init ia l va lue of t he i s _ s t m t r e gist er .
A sim ple cod e genera t or t h at em it s m ach ine ins t ru ct ions in t h e ord er im pl ied by t h e
sou rce program wou l d set t h is t o ‘‘t ru e,’’ and every ent ry in t h e m at rix wou l d
represent a st at em ent bou nd ary . A pipel ine sch ed u l ing cod e genera t or wou l d set t h is
t o ‘‘f al se’’ and em it a specifi c st at em ent p rogram op cod e f or each inst ru ct ion t h at
represent ed a st a t em ent bou nd ary .
6. l i n e _ b a s e ( sbyt e)
T h is pa r a m et er a ffect s t he mea ning of t he specia l opcodes. See below.
7. l i n e _ r a n g e ( u byt e)
T h is pa r a m et er a ffect s t he mea ning of t he specia l opcodes. See below.
8. o p c o d e _ b a s e ( u byt e)
T he n u m ber a ssigned t o t he fir st specia l opcode.
9. s t a n d a r d _ o p c o d e _ l e n g t h s ( a r r a y of u b yt e)
T h is a r r a y specifies t he nu m ber of L E B128 oper a nds for ea ch of t h e st a n da r d
opcodes. T he fir st elem en t of t he a r r a y cor r espond s t o t he opcode whose va lue is 1,
a nd t he la st element cor r espond s t o t he opcode whose va lue is o p c o d e _ b a s e -
1. By incr ea sing o p c o d e _ b a s e, a nd a dd in g elem en t s t o t h is a r r a y, new st a nda r d
opcodes ca n be a d ded , while a llowing consumer s who do n ot know a b out t hese new
opcodes t o be a ble t o skip t hem .
10. i n c l u d e _ d i r e c t o r i e s ( sequence of pa t h na mes)
T he sequence cont a ins a n en t r y for ea ch pa t h t ha t wa s sea r ch ed for inclu ded sour ce
files in t h is compila t ion. ( T he pa t h s inclu de t h ose dir ect or ies specified explic it ly by
t he user for t he compiler t o sea r ch a n d t h ose t he compiler sea r ches wit h out explicit
dir ect ion) . E a ch pa t h ent r y is eit her a fu ll pa t h na me or is r ela t ive t o t he cu r r ent
dir ect or y of t he compila t ion. T he cur r en t dir ect or y of t he compila t ion is under st ood
t o be t he fir st en t r y a nd is not explic it ly r epr esen t ed . E a ch en t r y is a nu ll- t er m ina t ed
st r in g cont a ining a fu ll pa t h na me. T he la st ent r y is f ollowed by a single n u ll b yt e.
11. f i l e _ n a m e s ( seq u en ce of file ent r ies)
T he sequence cont a ins a n en t r y for ea ch sour ce file t ha t cont r ibu t ed t o t h e st a t emen t
infor ma t ion for t h is compila t ion u nit or is used in ot h er cont ext s, such a s in a
decla r a t ion coor dina t e or a m a cr o file inclusion . E a ch en t r y ha s a n u ll- t er m ina t ed
st r in g cont a ining t he file na m e, a n u nsigned L E B128 nu m ber r epr esen t ing t h e
dir ect or y index of t he d ir ect or y in which t he file wa s f oun d , a n u n signed L E B128
nu m ber r epr esen t ing t he t im e of la st m odifica t ion for t he file a nd a n u n signed
L E B128 n u m ber r epr esen t in g t h e len gt h in b yt es of t h e file. A compiler ma y choose
t o em it L E B128( 0) for t he t im e a nd len gt h fields t o indica t e t ha t t h is infor m a t ion is
not a va ila b le. T h e la st ent r y is followed b y a single nu ll byt e.
T he d ir ect or y index r epr esen t s a n ent r y in t he i n c l u d e _ d i r e c t o r i e s sect ion.
T he index is L E B128( 0) if t he file wa s found in t he cur r en t d ir ect or y of t h e
compila t ion, L E B128( 1) if it wa s f ound in t he fir st dir ect or y in t he
i n c l u d e _ d i r e c t o r i e s sect ion, a n d so on. T he d ir ect or y index is ignor ed for
file na mes t ha t r epr esen t fu ll pa t h na mes.
3. DW_LNS_advance_line
T a kes a single signed L E B128 oper a nd a nd a d d s t ha t va lue t o t he l i n e r e gist er of
t he st a t e ma ch ine .
4. DW_LNS_set_file
T a kes a single u n signed L E B128 oper a n d a nd stor es it in t he f i l e r e gist er of t he
st a t e ma ch ine.
5. DW_LNS_set_column
T a kes a single u n signed L E B128 oper a n d a nd stor es it in t he c o l u m n r e gist er of
t he st a t e ma ch ine .
6. DW_LNS_negate_stmt
T a kes no a r gu m ent s. S et t he i s _ s t m t r e gist er of t he st a t e ma chine t o t he logica l
nega t ion of it s cu r r en t va lue.
7. DW_LNS_set_basic_block
T a kes no a r gu m ent s. S et t he b a s i c _ b l o c k r e gist er of t he st a t e ma chine t o
‘‘t r u e.’’
8. DW_LNS_const_add_pc
T a kes no a r gu m ent s. A dd t o t he a d d r e s s r e gist er of t he st a t e ma chine t he
a ddr ess incr ement va lu e cor r esponding t o specia l opcode 255.
T h e m ot ivat ion f or D W _ L N S _ c o n s t _ a d d _ p c is t h is: wh en t h e st at em ent
program need s t o ad vance t h e ad d ress by a sm a l l am ou nt , it can u se a single special
opcod e, wh ich occu p ies a single by t e. W h en it need s t o ad vance t h e ad d ress by u p t o
t wice t h e range of t h e l a st special op cod e, it can u se D W _ L N S _ c o n s t _ a d d _ p c
f ol l owed by a special op cod e, f or a t ot al of t wo by t es. Only if i t need s t o ad vance
t h e ad d ress by m ore t h an t wice t h at range wil l it need t o u se bot h
D W _ L N S _ a d v a n c e _ p c and a special op cod e, requ iri ng t h ree or m ore by t es.
9. DW_LNS_fixed_advance_pc
T a kes a single u h a lf oper a nd. A dd t o t he a d d r e s s r e gist er of t he st a t e ma chine
t he va lue of t he ( u nencoded) oper a n d. T h is is t h e only ext en ded opcode t ha t t a kes a n
a r gu men t t ha t is n ot a va r ia ble len gt h nu m ber .
T h e m ot ivat ion f or D W _ L N S _ f i x e d _ a d v a n c e _ p c is t h is: ex ist ing assem blers
cannot em i t D W _ L N S _ a d v a n c e _ p c or special opcod es becau se t hey cannot
encode L E B 128 nu m bers or j u d ge wh en t h e com pu t a t ion of a special op cod e
overfl ows and requ ires t h e u se of D W _ L N S _ a d v a n c e _ p c. S u ch assem bl ers,
h owever, can u se D W _ L N S _ f i x e d _ a d v a n c e _ p c inst ead , sacrifi cing
com pression.
6.2.5 .3 Ex tended Opcodes
T her e a r e t h r ee ext ended opcodes c ur r ent ly defined. T he fir st byt e following t he len gt h
field of t he encoding for ea ch cont a ins a su b-opcode.
1. DW_LNE_end_sequence
Set t h e e n d _ s e q u e n c e r e gist er of t he st a t e ma chine t o ‘‘t r ue’’ a n d a ppend a r ow
t o t he ma t r ix u sing t he cur r en t va lues of t h e st a t e-ma chine r egist er s. T hen r eset t h e
r e gist er s t o t he in it ia l va lues specified a b ove.
• A cod e loca t ion t h at is wit h in t h e su brou t ine. T h is l ocat ion is eit h er t h e p l ace where
t h e p rogram st op ped wh en t h e d ebu gger got cont rol ( e.g. a break point ) , or is a pl ace
wh ere a su brou t ine m ad e a cal l or was int erru p t ed by an asy nch ronou s event ( e.g. a
signal) .
• A n area of m em ory t h at is al l ocat ed on a st ack cal l ed a ‘‘cal l f ram e.’’ T h e cal l f ram e
is id ent ifi ed by an ad d ress on t h e st ack . W e ref er t o t h is ad d ress as t h e Canonical
Fram e A d d ress or CFA .
• A set of regi st ers t h at are in u se by t h e su brou t ine at t h e cod e l ocat ion.
T y p ical l y , a set of regist ers are d esignat ed t o be preserved across a cal l . I f a cal lee wish es
t o u se su ch a regis t er, it saves t h e val u e t h a t t h e regist er h ad a t ent ry t im e in it s cal l
f ram e and rest ores it on ex it . T h e cod e t h at al l ocat es space on t h e cal l f ram e st ack and
perf orm s t h e save op erat ion is cal l ed t h e su brou t ine’s prol ogu e, and t h e cod e t h at
perf orm s t h e res t ore op erat ion and d eal l ocat es t h e f ram e is cal l ed it s ep il ogu e. T y pical l y ,
t h e p rol ogu e cod e is ph y sical ly at t h e begi nni ng of a su brou t ine and t h e epil ogu e cod e is
at t h e end .
T o be able t o view or m od if y an act ivat ion t h at is not on t h e t op of t h e cal l f ram e s t ack ,
t h e d ebu gger m u st ‘‘vi rt u al l y u nwi nd ’’ t h e st ack of act ivat ions u nt il it fi nd s t h e act ivat ion
of int erest . A d ebu gger u nwi nd s a st ack in st eps. S t art ing wit h t h e cu rrent act iva t ion it
rest ores any regi st ers t h at were preserved by t h e cu rrent act ivat ion and com p u t es t h e
pred ecessor’s CFA and cod e locat ion. T h is h as t h e l ogical eff ect of ret u rning f rom t h e
cu rrent su brou t ine t o it s pred ecess or. W e say t h at t h e d ebu gger virt u al l y u nwind s t h e
st ack becau se it preserves enou gh inf orm at ion t o be able t o ‘‘rewind ’’ t h e st ack back t o t h e
st at e i t was in bef ore it at tem p t ed t o u nwi nd it .
T h e u nwind ing operat ion need s t o k now where regist ers are saved and h ow t o com p u t e t h e
pred ecessor’s CFA and cod e locat ion. W h en consid ering an arch it ect u re- ind epend ent way
of encod ing t h is inf orm at ion one h as t o consid er a nu m ber of special t h ings.
• Prol ogu e and ep i logu e cod e i s not a lway s in d ist inct block s at t h e beginning and end of
a su brou t ine. I t is com m on t o d u p l icat e t h e ep il ogu e cod e at t h e sit e of each ret u rn
f rom t h e cod e. S om et im es a com p il er break s u p t h e regist er save/u nsave op erat ions
and m oves t h em int o t h e bod y of t h e su brou t ine t o j u st where t h ey are need ed .
• Com pilers u se d iff erent way s t o m anage t h e cal l f ram e. S om et im es t h ey u se a f ram e
point er regist er, som et im es not .
• T h e a lgorit h m t o com p u t e t h e CFA ch anges as y ou p rogress t h rou gh t h e prol ogu e and
epil ogu e cod e. ( B y d efi nit ion, t h e CFA valu e d oes not ch ange.)
• S om e su brou t ines h ave no cal l f ram e.
• S om et im es a regi st er is saved in anot h er regist er t h at by convent ion d oes not need t o
be saved .
• S om e arch i t ect u res h ave special inst ru ct ions t h at p erf orm som e or al l of t h e regist er
m anagem ent in one ins t ru ct ion, leav ing specia l inf orm at ion on t h e st ack t h at ind icat es
h ow regist ers are saved .
• S om e arch i t ect u res t reat ret u rn ad d ress va l u es special l y . For ex am p l e, in one
arch i t ect u re, t h e cal l inst ru ct ion gu ara nt ees t h at t h e low ord er t wo bi t s wil l be z ero
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 62
-- --
and t h e ret u rn ins t ru ct ion ignores t h ose bit s. T h is leaves t wo bi t s of st orage t h at are
avail able t o ot h er u ses t h at m u st be t reat ed special l y .
6.4.1 Structure of Call Frame Information
DW A R F suppor t s vir t ua l u nwind ing by defining a n a r ch it ect u r e indepen dent ba sis for
r ecor ding h ow pr ocedu r es sa ve a nd r est ore r e gist er s t hr ough out t heir lifet im es. T h is ba sis
mu st be a u gm en t ed on some ma ch ines with specific infor m a t ion t ha t is defined by e it her a n
a r ch it ect ur e specific A BI a u t hor in g comm it t ee, a ha r dwa r e ven d or , or a compiler pr oducer .
T he b ody d efin in g a specific a u gm ent a t ion is r efer r ed t o be low a s t he ‘‘a ugm ent er .’’
A b st r a ct ly, t h is mecha nism descr ibes a ver y la r ge t a ble t ha t ha s t h e following str uct ur e:
T he fir st colum n indica t es a n a ddr ess for ever y loca t ion t ha t cont a ins code in a pr ogr a m .
( I n sha r ed object s, t h is is a n object -r ela t ive offset .) T he r ema in ing colum ns cont a in vir t ua l
unwinding r ules t ha t a r e a ssocia t ed wit h t he indica t ed loca t ion. T he fir st column of t he
r ules defines t he C F A r ule which is a r egist er a nd a signed offset t h a t a r e a dded t oget her t o
compu t e t h e C F A va lu e.
T he r em a in ing colum n s a r e la beled by r e gist er nu m ber . T h is includes some r e gist er s t hat
ha ve specia l designa t ion on some a r ch it ect ur es such a s t he P C a nd t he st a ck point er
r e gist er . ( T he a ct ua l m a pp in g of r e gist er s for a pa r t icu la r a r ch it ect ur e is per for m ed by t h e
a u gm ent er .) T he r egist er colum ns cont a in r ules t ha t descr ibe whet her a given r egist er ha s
been sa ved a nd t h e r ule t o find t he va lue for t he r e gist er in t he pr evious fr a me.
T he r egist er r u les a r e:
undefined A r e gist er t h a t ha s t h is r u le ha s no va lue in t h e pr evious fr a me.
( By conven t ion, it is n ot pr eser ved b y a ca llee.)
sa me va lue T h is r egist er ha s n ot been m odified fr om t he pr evious fr a me. ( By
conven t ion, it is pr eser ved by t h e ca llee , b u t t h e ca llee ha s n ot
m odified it .)
offset ( N ) T he pr evious va lue of t h is r e gist er is sa ved a t t h e a ddr ess C F A + N
wher e C F A is t he cu r r ent C F A va lu e a nd N is a signed offset .
r e gist er ( R ) T he pr evious va lue of t h is r e gist er is stor ed in a n ot her r egist er
n u m ber e d R .
a r ch it ect ur a l T he r u le is defined ext er na lly t o t h is specifica t ion by t he a u gm en t er .
T h is t able wou l d be ex t rem el y l arge if act u al l y const ru ct ed as d escribed . M os t of t h e
ent ries at any p oi nt in t h e t abl e are id ent ical t o t h e ones above t h em . T h e wh ol e t abl e can
be represent ed qu it e com pact l y by record ing j u st t h e d iff erences st a rt ing at t h e beginning
ad d ress of each su brou t ine in t h e p rogram .
T he vir t ua l unwind infor ma t ion is encoded in a self-cont a ined sec t ion ca lled
. d e b u g _ f r a m e. E n t r ies in a . d e b u g _ f r a m e sect ion a r e a ligned on a n a ddr essing
unit b ounda r y a n d come in t wo for ms: A C omm on I nfor ma t ion E nt r y ( C I E ) a nd a F ra me
D escr ipt ion E n t r y ( F D E ) . S izes of da t a object s used in t he encoding of t he
. d e b u g _ f r a m e sect ion a r e descr ibed in t er m s of t h e sa m e da t a d efin it ions u sed for t he
line n u m ber infor ma t ion ( see sect ion 6.2 .1) .
A C omm on I nfor ma t ion E n t r y h olds infor m a t ion t ha t is sha r ed a mong ma ny F r a m e
D escr ipt or s. T her e is a t lea st one C I E in ever y non-em pt y . d e b u g _ f r a m e sect ion. A
C I E cont a ins t he f ollowing field s, in or der :
1. length
A u wor d const a n t t ha t gives t he nu mber of byt es of t he C I E st r uct u r e, not inclu ding
t he lengt h field , it self ( len gt h mod < a ddr essing unit size> = = 0) .
2. CIE_id
A u wor d const a n t t ha t is used t o d ist ingu ish C I E s fr om F D E s.
3. version
A u b yt e ver sion n u m ber . T h is nu m ber is specific t o t h e ca ll fr a me infor m a t ion a nd is
independent of t h e D W A R F ver sion nu m ber .
4. augmentation
A nu ll t er m ina t ed str in g t ha t iden t ifies t he a u gm en t a t ion t o t h is C I E or t o t he FD E s
t ha t u se it . I f a r ea der encount er s a n a ugm ent a t ion st r ing t ha t is u nexpect ed , t hen
only t he f ollowing field s ca n be r ea d : C I E : l e n g t h, C I E _ i d, v e r s i o n,
a u g m e n t a t i o n; F D E : l e n g t h, C I E _ p o i n t e r, i n i t i a l _ l o c a t i o n,
a d d r e s s _ r a n g e. I f t her e is n o a u gm en t a t ion, t h is va lue is a zer o b yt e.
5. code_alignment_factor
A n u nsigned L E B128 const a nt t ha t is fa ct or ed out of a ll a dva nce loca t ion in st r uct ions
( see below) .
6. data_alignment_factor
A signed L E B128 const a n t t h a t is fa ct or ed out of a ll offset in str uct ions ( see below.)
7. return_address_register
A u b yt e const a n t t ha t in dica t es which colum n in t he r u le t a ble r epr esen t s t he r e t ur n
a ddr ess of t he fu n ct ion. N ote t ha t t h is column m igh t n ot cor r espond t o a n a ct ua l
ma ch ine r e gist er .
8. initial_instructions
A sequence of r u les t ha t a r e in t er pr e t ed t o cr ea t e t he in it ia l set t ing of ea ch colu m n in
t he t a ble.
9. padding
E nough D W _ C F A _ n o p inst r uct ions t o m a ke t h e size of t h is en t r y ma t ch t he
l e n g t h va lue a bove.
A n F D E cont a ins t he f ollowing field s, in or der :
1. length
A u wor d const a n t t ha t gives t he nu mber of byt es of t he hea der a nd inst r u ct ion
st r ea m for t h is fu nct ion ( not inclu d ing t he len gt h field it self) ( len gt h m od
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 64
-- --
______________________________________________________________________
__T_a_g__n_a_m __e______________________________________Va ___lu__e_________________
D W _ T A G _ a r r a y _ t y p e 0x01
D W _ T A G _ c l a s s _ t y p e 0x02
D W _ T A G _ e n t r y _ p o i n t 0x03
D W _ T A G _ e n u m e r a t i o n _ t y p e 0x04
D W _ T A G _ f o r m a l _ p a r a m e t e r 0x05
D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n 0x08
D W _ T A G _ l a b e l 0x0a
D W _ T A G _ l e x i c a l _ b l o c k 0x0b
D W _ T A G _ m e m b e r 0x0d
D W _ T A G _ p o i n t e r _ t y p e 0x0f
D W _ T A G _ r e f e r e n c e _ t y p e 0x10
D W _ T A G _ c o m p i l e _ u n i t 0x11
D W _ T A G _ s t r i n g _ t y p e 0x12
D W _ T A G _ s t r u c t u r e _ t y p e 0x13
D W _ T A G _ s u b r o u t i n e _ t y p e 0x15
D W _ T A G _ t y p e d e f 0x16
DW _ T A G _ u n i o n _ t y p e 0x17
DW _ TA G _ un s pe c i fi e d _p a ra m e te r s 0x18
DW _ TA G _ va r ia n t 0x19
DW _ TA G _ co m mo n _ bl o c k 0x1a
DW _ TA G _ co m mo n _ in c l us i on 0x1b
DW_TAG_inheritance 0x1c
DW_TAG_inlined_subroutine 0x1d
DW_TAG_module 0x1e
DW_TAG_ptr_to_member_type 0x1f
DW_TAG_set_type 0x20
DW_TAG_subrange_type 0x21
DW_TAG_with_stmt 0x22
DW_TAG_access_declaration 0x23
DW_TAG_base_type 0x24
DW_TAG_catch_block 0x25
DW_TAG_const_type 0x26
DW_TAG_constant 0x27
DW_TAG_enumerator 0x28
_ _D_W____T__A_G____f__i_l__e____t_y__p_e________________________0 __9_________________
__x_2
Figure 14. T a g encodings ( pa r t 1)
a ddr ess R epr esen t ed a s a n object of a ppr opr ia t e size t o h old a n a ddr ess on t he
t a r ge t ma chine (D W _ F O R M _ a d d r) . T h is a ddr ess is r eloca t a ble in a
r eloca t a ble object file a nd is r eloca t ed in a n execu t a ble file or sha r ed
object .
block Blocks come in f our for m s. T he fir st c onsist s of a 1- b yt e len gt h
followed by 0 to 255 cont igu ous infor ma t ion b yt es
(D W _ F O R M _ b l o c k 1) . T he second consist s of a 2- b yt e lengt h
followed b y 0 t o 65,535 cont igu ous infor ma t ion byt es
(D W _ F O R M _ b l o c k 2) . T he t h ir d con sists of a 4- byt e lengt h
followed b y 0 t o 4,294,967,2 95 cont igu ous infor ma t ion b yt es
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 72
-- --
_______________________________________________________
__T_a_g__n_a_m __e___________________________________Va __e_____
___lu
DW_TAG_friend 0x2a
DW_TAG_namelist 0x2b
DW_TAG_namelist_item 0x2c
DW_TAG_packed_type 0x2d
DW_TAG_subprogram 0x2e
DW_TAG_template_type_param 0x2f
DW_TAG_template_value_param 0x30
DW_TAG_thrown_type 0x31
DW_TAG_try_block 0x32
DW_TAG_variant_part 0x33
DW_TAG_variable 0x34
DW_TAG_volatile_type 0x35
DW_TAG_lo_user 0x4080
_ _D_W____T__A_G____h__i____u_s__e_r________________________0 __x_f __f__
__f_f
Figure 15. T a g encodings ( pa r t 2)
____________________________________
__C_h__ild
___d_e_t_e_r _m_in
__a_t_io ___lu_e__
__n_n__a_m__e____Va
DW_CHILDREN_no 0
__D_W
____C__H_I
__L_D __R_E__N____y_e__s_______1______
Figure 16. C h ild det er mina t ion encodings
(D W _ F O R M _ b l o c k 4) . T he four t h consist s of a n u n signed L E B128
len gt h f ollowed b y t he nu m ber of b yt es specified by t h e len gt h
(D W _ F O R M _ b l o c k) . I n a ll for m s, t he len gt h is t he nu m ber of
infor ma t ion byt es t ha t f ollow. T he infor ma t ion byt es ma y cont a in a ny
m ixt ur e of r eloca t ed ( or r eloca t a ble) a ddr esses, r efer ences t o ot h er
debu ggin g infor ma t ion en t r ies or da t a b yt es.
const a n t T her e a r e six f or m s of const a n t s: one, t wo, four a nd eigh t byt e va lues
( r espect ively, D W _ F O R M _ d a t a 1, D W _ F O R M _ d a t a 2,
D W _ F O R M _ d a t a 4, a nd D W _ F O R M _ d a t a 8) . T her e a r e a lso
va r ia ble lengt h const a nt da t a for m s encoded u sing L E B128 nu m ber s
( see below) . Bot h signed ( D W _ F O R M _ s d a t a) a nd unsigned
(D W _ F O R M _ u d a t a) va r ia ble lengt h const a nt s a r e a va ila ble.
fla g A fla g is r epr esen t ed a s a single byt e of da t a (D W _ F O R M _ f l a g) . I f
t he fla g ha s va lue zer o, it indica t es t h e a bsence of t he a t t r ibu t e. I f t h e
fla g h a s a non-zer o va lu e, it in dica t es t he pr esence of t h e a t t r ibu t e.
r efer ence T her e a r e t wo t ypes of r efer ence. T he fir st is a n offset r ela t ive t o t he
fir st b yt e of t he compila t ion u nit hea der for t he compila t ion unit
cont a ining t he r efer ence. T he offset m u st r efer t o a n en t r y wit h in t ha t
sa me compila t ion u n it . T her e a r e five for ms for t h is t ype of r efer ence:
one, t wo, four a nd eigh t byt e offset s ( r espect ively, D W _ F O R M _ r e f 1,
D W _ F O R M _ r e f 2, D W _ F O R M _ r e f 4, a nd D W _ F O R M _ r e f 8) .
T her e a r e is a lso a n u n signed va r ia ble len gt h offset encoded u sing
L E B128 n u m ber s (D W _ F O R M _ r e f _ u d a t a) .
_____________________________________________________________________
__A __t t_r_ib
__u_t_e__n_a_m__e______________________Va ___lu
__e_____C_la __________________
__sses
D W _ A T _ s i b l i n g 0x01 r efer ence
D W _ A T _ l o c a t i o n 0x02 block, const a n t
D W _ A T _ n a m e 0x03 st r in g
D W _ A T _ o r d e r i n g 0x09 const a n t
D W _ A T _ b y t e _ s i z e 0x0b const a n t
D W _ A T _ b i t _ o f f s e t 0x0c const a n t
D W _ A T _ b i t _ s i z e 0x0d const a n t
D W _ A T _ s t m t _ l i s t 0x10 const a n t
D W _ A T _ l o w _ p c 0x11 a ddr ess
DW _ A T _ h i g h _ p c 0x12 a ddr ess
DW _ AT _ l an g ua g e 0x13 const a n t
DW _ AT _ d is c r 0x15 r efer ence
DW _ AT _ d is c r_ v a lu e 0x16 const a n t
DW _ AT _ v is i bi l i ty 0x17 const a n t
DW _ AT _ i mp o rt 0x18 r efer ence
DW_AT_string_length 0x19 block, const a n t
DW_AT_common_reference 0x1a r efer ence
DW_AT_comp_dir 0x1b st r in g
DW_AT_const_value 0x1c st r in g, const a n t , block
DW_AT_containing_type 0x1d r efer ence
DW_AT_default_value 0x1e r efer ence
DW_AT_inline 0x20 const a n t
DW_AT_is_optional 0x21 fla g
DW_AT_lower_bound 0x22 const a n t , r efer ence
DW_AT_producer 0x25 st r in g
DW_AT_prototyped 0x27 fla g
DW_AT_return_addr 0x2a block, const a n t
DW_AT_start_scope 0x2c const a n t
DW_AT_stride_size 0x2e const a n t
__D__W____A_T____u__p_p__e_r____b__o_u__n_d____________0 __x_2
__f_____con ______
___st_a__n_t ,__r_e_fe_r_e_n_ce
Figure 17. A t t r ibu t e encodin gs, pa r t 1
T he second t ype of r efer ence is t he a ddr ess of a n y debu ggin g
infor ma t ion en t r y wit h in t he sa me execu t a ble or sha r ed object ; it ma y
r efer t o a n ent r y in a d iffer en t compila t ion u n it f r om t he u n it
cont a ining t he r efer ence. T h is t ype of r ef e r e n ce
(D W _ F O R M _ r e f _ a d d r) is t h e size of a n a d dr ess on t he t a r ge t
a r ch it ect u r e; it is r eloca t a ble in a r eloca t a ble object file a nd r eloca t ed
in a n execu t a ble file or sha r ed object .
T h e u se of com p il at ion u ni t rel at ive ref erences wil l red u ce t h e
nu m ber of l ink - t im e rel ocat ions and so speed u p l ink ing.
T h e u se of ad d ress- t y pe ref erences al l ows f or t h e com m oniz at ion of
inf orm at ion, su ch as t y pes, across com p i lat ion u ni t s.
st r in g A st r ing is a sequence of cont igu ous non- nu ll b yt es f ollowed by one
nu ll b yt e. A st r ing ma y be r epr esen t ed im media t ely in t he debu gging
infor ma t ion en t r y it self (D W _ F O R M _ s t r i n g) , or ma y be
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 74
-- --
___________________________________________________________________________
__A __t t_r_ib
__u_t_e_n__a_m__e____________________________Va ___lu
__e________C_la _______________
__sses
D W _ A T _ a b s t r a c t _ o r i g i n 0x31 r efer ence
D W _ A T _ a c c e s s i b i l i t y 0x32 const a n t
D W _ A T _ a d d r e s s _ c l a s s 0x33 const a n t
D W _ A T _ a r t i f i c i a l 0x34 fla g
D W _ A T _ b a s e _ t y p e s 0x35 r efer ence
D W _ A T _ c a l l i n g _ c o n v e n t i o n 0x36 const a n t
D W _ A T _ c o u n t 0x37 const a n t , r efer ence
D W _ A T _ d a t a _ m e m b e r _ l o c a t i o n 0x38 block, r efer ence
D W _ A T _ d e c l _ c o l u m n 0x39 const a n t
D W _ A T _ d e c l _ f i l e 0x3a const a n t
DW _ A T _ d e c l _ l i n e 0x3b const a n t
DW _ AT _ d ec l ar a t io n 0x3c fla g
DW _ AT _ d is c r_ l i st 0x3d block
DW _ AT _ e nc o di n g 0x3e const a n t
DW _ AT _ e xt e rn a l 0x3f fla g
DW _ AT _ f ra m e_ b a se 0x40 block, const a n t
DW _ AT_fri e nd 0x41 r efer ence
DW_AT_identifier_case 0x42 const a n t
DW_AT_macro_info 0x43 const a n t
DW_AT_namelist_item 0x44 block
DW_AT_priority 0x45 r efer ence
DW_AT_segment 0x46 block, const a n t
DW_AT_specification 0x47 r efer ence
DW_AT_static_link 0x48 block, const a n t
DW_AT_type 0x49 r efer ence
DW_AT_use_location 0x4a block, const a n t
DW_AT_variable_parameter 0x4b fla g
DW_AT_virtuality 0x4c const a n t
DW_AT_vtable_elem_location 0x4d block, r efer ence
DW_AT_lo_user 0x2000 —
__D_W________________________________________________________________________
_ A T _ h i _ u s e r 0 x 3 f f f —
Figure 18. A t t r ibu t e encodin gs, pa r t 2
r epr esen t ed a s a 4-byt e offset in t o a st r ing t a ble cont a ined in t h e
. d e b u g _ s t r sect ion of t he object file (D W _ F O R M _ s t r p) .
T he f or m encodings a r e listed in F igu r e 1 9.
7.6 Variable Length D ata
T he specia l const a n t da t a for ms D W _ F O R M _ s d a t a a nd D W _ F O R M _ u d a t a a r e encoded
using ‘‘L it t le E n dia n Ba se 128’’ ( L E B128) nu mber s. L E B128 is a sch eme for encoding
int eger s densely t ha t e xploit s t he a ssu m p t ion t h a t m ost in t eger s a r e sma ll in m a gn it ude.
( T h is encoding is equa lly su it a ble whet h er t he t a r ge t ma ch ine a r ch it ect ur e r epr esen t s da t a
in big-endia n or lit t le-endia n or der . I t is ‘‘lit t le endia n’’ only in t he sense t ha t it a voids
using spa ce t o r epr esen t t he ‘‘big’’ end of a n u n signed int eger , when t he big en d is a ll
zer oes or sign ext en sion b it s) .
__________________________________________________________
__F_or__m ___n_a_m__e___________________Va ___lu_e_____C__la__ss______________
DW _ FO R M _a d dr 0x01 a ddr ess
DW _ FO R M _b l oc k 2 0x03 block
DW _ FO R M _b l ock4 0x04 block
DW _ FO R M _d a ta2 0x05 const a n t
DW_FORM_data4 0x06 const a n t
DW_FORM_data8 0x07 const a n t
DW_FORM_string 0x08 st r in g
DW_FORM_block 0x09 block
DW_FORM_block1 0x0a block
DW_FORM_data1 0x0b const a n t
DW_FORM_flag 0x0c fla g
DW_FORM_sdata 0x0d const a n t
DW_FORM_strp 0x0e st r in g
DW_FORM_udata 0x0f const a n t
DW_FORM_ref_addr 0x10 r efer ence
DW_FORM_ref1 0x11 r efer ence
DW_FORM_ref2 0x12 r efer ence
DW_FORM_ref4 0x13 r efer ence
DW_FORM_ref8 0x14 r efer ence
DW_FORM_ref_udata 0x15 r efer ence
__D__W____F_O__R_M____i__n_d__i_r__e_c__t______0_x
__1_6 _____(_see
____sec ___t ion __.3_)__
____7_.5
Figure 19. A t t r ibu t e f or m encodin gs
D W _ F O R M _ u d a t a ( u n signed L E B128) nu mber s a r e encode d a s f ollows: st a r t a t t he low
or der en d of a n u n signed in t eger a n d ch op it in t o 7- b it chu nk s. P la ce ea ch ch u n k in t o t he
low or der 7 bit s of a byt e . T ypica lly, sever a l of t h e h igh or der byt es will be zer o; disca r d
t hem . E m it t he r ema in ing byt es in a st r ea m , st a r t ing wit h t he low or der b yt e; set the h igh
or der bit on ea ch b yt e except t he la st em it t ed byt e. T he high b it of zer o on t he la st byt e
indica t es t o t he decoder t ha t it ha s encount er ed t he la st byt e.
T he int eger zer o is a specia l ca se, c onsist ing of a single zer o b yt e.
Figu re 20 gives som e ex am p l es of D W _ F O R M _ u d a t a nu m bers . T h e 0 x 8 0 in each case
is t h e h igh ord er bit of t h e by t e, ind icat ing t h at an ad d it iona l by t e f ol l ows:
_______________________________________
__N__u_m __e______S_e_c_o_n_d__b__yt_e__
__b_e_r____F__ir_st__b_yt
2 2 —
127 127 —
128 0+0x80 1
129 1+0x80 1
130 2+0x80 1
12857
_____________5__7_+__0_x__8_0_____1_0 __0_________
Figure 20. E xa mples of u n signed L E B128 encodin gs
T he encoding for D W _ F O R M _ s d a t a ( signed , 2s complem ent L E B128) nu m ber s is
simila r , except t h a t t he cr it er ion for disca r ding high or der b yt es is not whe t her t hey a r e
zer o, bu t whe t her t hey con sist en t ir ely of sign ext en sion b it s. C onsider t he 32- bit in t eger
- 2. T he t hr ee h igh level b yt es of t he nu mber a r e sign ext ension, t h u s L E B128 would
r epr esen t it a s a single b yt e cont a in ing t he low or der 7 b it s, with t he high or der b it clea r ed
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 76
-- --
t o indica t e t he en d of t he byt e str ea m . N ote t ha t t her e is not h ing wit hin t h e L E B128
r epr esen t a t ion t h a t indica t es whet her a n encoded nu mber is signed or u nsigned . T h e
decoder m u st kn ow wha t t ype of nu mber t o expec t .
Figu re 21 gives som e ex am p l es of D W _ F O R M _ s d a t a nu m bers .
A ppend ix 4 gives al gor it h m s f or encod ing and decod ing t h ese f orm s.
__________________________________________
__N__u_m __e_________S_e_c_o_n_d__b__yt_e__
__b_e_r____F__ir_st__b_yt
2 2 —
-2 0x7e —
127 127+0x80 0
-127 1+0x80 0x7f
128 0+0x80 1
-128 0+0x80 0x7f
129 1+0x80 1
___-_1__2_9
______0__x_7__f_+__0_x__8_0_____0_x__7_e ________
Figure 21. E xa mples of signed L E B128 encodings
7.7 Location D escriptions
7.7.1 Location Ex pressions
A loca t ion expr ession is st or ed in a b lock of cont igu ou s b yt e s. T h e byt es for m a set of
oper a t ions. E a ch loca t ion oper a t ion ha s a 1- byt e code t ha t ident ifies t ha t oper a t ion.
O per a t ions ca n be followed b y one or mor e byt es of a d dit iona l da t a . A ll oper a t ions in a
loca t ion expr ession a r e conca t ena t ed fr om lef t t o r igh t . T he encodings f or t he oper a t ions in
a loca t ion expr ession a r e descr ibed in F igur es 22 a nd 23 .
_______________________________________________________________________________________________
__O_p_e_r_a_t_ion
______________________C__ode ___O_p_e_r_a_n__d_s____N__o_t e_s________________________________
________N__o.__of
D W _ O P _ a d d r 0x03 1 const a n t a ddr ess ( size t a r ge t specific)
D W _ O P _ d e r e f 0x06 0
D W _ O P _ c o n s t 1 u 0x08 1 1- b yt e c onst a n t
D W _ O P _ c o n s t 1 s 0x09 1 1- b yt e c onst a n t
D W _ O P _ c o n s t 2 u 0x0a 1 2- b yt e c onst a n t
DW _ O P _ c o n s t 2 s 0x0b 1 2- b yt e c onst a n t
DW _ OP _ c on s t4 u 0x0c 1 4- b yt e c onst a n t
DW _ OP _ c on s t4 s 0x0d 1 4- b yt e c onst a n t
DW _ OP _ c on s t8 u 0x0e 1 8- b yt e c onst a n t
DW _ OP _ c on s t8 s 0x0f 1 8- b yt e c onst a n t
DW _ OP _ c on s tu 0x10 1 U L E B128 const a n t
DW _ OP_con s ts 0x11 1 S L E B128 const a n t
DW_OP_dup 0x12 0
DW_OP_drop 0x13 0
DW_OP_over 0x14 0
DW_OP_pick 0x15 1 1- b yt e st a ck index
DW_OP_swap 0x16 0
DW_OP_rot 0x17 0
DW_OP_xderef 0x18 0
DW_OP_abs 0x19 0
DW_OP_and 0x1a 0
DW_OP_div 0x1b 0
DW_OP_minus 0x1c 0
DW_OP_mod 0x1d 0
DW_OP_mul 0x1e 0
DW_OP_neg 0x1f 0
DW_OP_not 0x20 0
DW_OP_or 0x21 0
DW_OP_plus 0x22 0
DW_OP_plus_uconst 0x23 1 U L E B128 a ddend
DW_OP_shl 0x24 0
DW_OP_shr 0x25 0
DW_OP_shra
______________________________0 __6_____0_______________________________________________________
__x_2
Figure 22. L oca t ion oper a t ion encodin gs, pa r t 1
________________________________________________________________________________________________________
_O __p_e_r_a_t_ion
______________________C __ode
________N_o.
___of __p_e_r_a_n_d__s ____N__o_t e_s_________________________________________
__O
D W _ O P _ x o r 0x27 0
D W _ O P _ s k i p 0x2f 1 signed 2- byt e const a n t
D W _ O P _ b r a 0x28 1 signed 2- byt e const a n t
D W _ O P _ e q 0x29 0
D W _ O P _ g e 0x2a 0
DW _ O P _ g t 0x2b 0
DW _ O P _ l e 0x2c 0
DW _ OP _ l t 0x2d 0
DW _ OP _ n e 0x2e 0
DW _ OP _ l it 0 0x30 0 lit er a ls 0..31 = ( D W_O P_L I T 0lit er a l)
DW _ OP _ l it 1 0x31 0
.. .
DW _ OP _ l it 3 1 0x4f 0
DW _ OP _ r eg 0 0x50 0 r eg 0..31 = ( D W_O P_R E G 0r egn um )
DW _ OP _ r eg1 0x51 0
...
DW _ OP _ r eg 3 1 0x6f 0
DW_OP_breg0 0x70 1 S L E B128 offset
DW_OP_breg1 0x71 1 ba se r eg 0 ..31 = ( D W_O P_BR E G 0r egn um )
...
DW_OP_breg31 0x8f 1
DW_OP_regx 0x90 1 U L E B128 r e gist er
DW_OP_fbreg 0x91 1 S L E B128 offset
DW_OP_bregx 0x92 2 U L E B128 r e gist er f ollowed by S L E B128 offset
DW_OP_piece 0x93 1 U L E B128 size of piece a ddr essed
DW_OP_deref_size 0x94 1 1- b yt e size of da t a r et r ieved
DW_OP_xderef_size 0x95 1 1- b yt e size of da t a r et r ieved
DW_OP_nop 0x96 0
DW_OP_lo_user 0xe0
_ D
__W____O_P ____h
__i__
__u_s ___________0__x_f__f_____________________________________________________________________
__e_r
Figure 23. L oca t ion oper a t ion encodin gs, pa r t 2
7.7.2 Location Lists
E a ch en t r y in a loca t ion list c onsist s of t wo r ela t ive a ddr esses followed b y a 2- b yt e lengt h ,
followed b y a block of cont igu ous b yt es. T he lengt h specifies t he n u m ber of b yt es in t he
block t ha t f ollows. T he t wo a ddr esses a r e t he sa me size a s u sed by D W _ F O R M _ a d d r on
t he t a r ge t m a ch in e.
7.8 Base Type Encodings
T he va lues of t he const a nt s u sed in t he D W _ A T _ e n c o d i n g a t t r ib u t e a r e given in F igu r e
24.
7.9 Acces sibility Codes
T he encodings of t he const a n t s u sed in t he D W _ A T _ a c c e s s i b i l i t y a t t r ib u t e a r e
given in F igur e 25.
__________________________________________
__Ba ___se__t_yp__e__e_n_c_odin
____g__n_a_m __e__________Va ___lu__e__
DW_ATE_address 0x1
DW_ATE_boolean 0x2
DW_ATE_complex_float 0x3
DW_ATE_float 0x4
DW_ATE_signed 0x5
DW_ATE_signed_char 0x6
DW_ATE_unsigned 0x7
DW_ATE_unsigned_char 0x8
DW_ATE_lo_user 0x80
__D__W____A_T__E____h_i____u__s_e__r_____________0 __x_f__f__
Figure 24. Ba se t ype encoding va lues
________________________________________
__A __c_c_e_ss_ib
__ilit
___y__c_ode
____n_a_m __e__________Va ___lu_e__
DW_ACCESS_public 1
DW_ACCESS_protected 2
__D__W____A_C__C_E__S_S____p__r_i__v_a__t_e________3______
Figure 25. Accessib ilit y encodin gs
7.10 Visibility Codes
T he encodings of t he const a n t s u sed in t he D W _ A T _ v i s i b i l i t y a t t r ib u t e a r e given in
F igu r e 26.
___________________________________
_ _Visib
____ilit
___y__c_o_d_e__n_a_m__e_________Va ___lu_e__
DW_VIS_local 1
DW_VIS_exported 2
_ _D_W____V__I_S____q__u_a__l_i__f_i__e_d_____3______
Figure 26. Visib ilit y encodings
7.11 Virtuality Codes
T he encodings of t he const a n t s u sed in t he D W _ A T _ v i r t u a l i t y a t t r ib u t e a r e given in
F igu r e 27.
__________________________________________________
_ _Vir
___t u__a_lit__y_c__o_d_e_n__a_m_e________________________Va ___lu_e__
DW_VIRTUALITY_none 0
DW_VIRTUALITY_virtual 1
_ _D_W____V__I_R__T_U__A_L__I_T__Y____p_u__r_e____v__i_r__t_u__a_l_____2______
Figure 27. Vir t u a lit y encodings
7.12 Source Languages
T he encodings for sour ce la n gua ge s a r e given in F igu r e 28. N a mes ma r ked with † a n d
t heir a ssocia t ed va lues a r e r eser ved , bu t t he la n gua ge s t hey r epr esen t a r e not suppor t ed in
DW A R F Ver sion 2.
7.13 Address Class Encodings
T he va lue of t he com m on a ddr ess cla ss encodin g D W _ A D D R _ n o n e is 0.
___________________________________________
__L_a_n_gu___a_ge___n_a_m__e_________________Va __e_____
___lu
DW_LANG_C89 0x0001
DW_LANG_C 0x0002
DW_LANG_Ada83† 0x0003
DW_LANG_C_plus_plus 0x0004
DW_LANG_Cobol74† 0x0005
DW_LANG_Cobol85† 0x0006
DW_LANG_Fortran77 0x0007
DW_LANG_Fortran90 0x0008
DW_LANG_Pascal83 0x0009
DW_LANG_Modula2 0x000a
DW_LANG_lo_user 0x8000
_ _D_W____L__A_N__G____h_i____u__s_e__r__________0
__x_f __f__
__f_f
Figure 28. L a n gua ge encodings
7.14 Identifier Case
T he encodings of t he const a n t s u sed in t he D W _ A T _ i d e n t i f i e r _ c a s e a t t r ib u t e a r e
given in F igur e 29.
____________________________________________
_ _I d__e_n_t _ifier
____C__a_se__N
__a_m
__e_________________Va ___lu_e__
DW_ID_case_sensitive 0
DW_ID_up_case 1
DW_ID_down_case 2
_ _D_W____I__D____c_a__s_e____i__n_s__e_n__s_i__t_i__v_e_____3______
Figure 29. I den t ifier ca se encodin gs
7.15 Calling Convention Encodings
T he encodings for t he va lues of t he D W _ A T _ c a l l i n g _ c o n v e n t i o n a t t r ib u t e a r e
given in F igur e 30.
____________________________________
_ C __a_llin
___g__C__onv
___en
__t_io_n__N
__a_m
__e____Va __e__
___lu
DW_CC_normal 0x1
DW_CC_program 0x2
D W _ C C _ n o c a l l 0x3
DW_CC_lo_user 0x40
_ D
__W____C_C
____h
__i__
__u_s__e_r __________0 __f__
__x_f
Figure 30. C a lling conven t ion encodin gs
7.16 Inline Codes
T he encodings of t he const a n t s u sed in t he D W _ A T _ i n l i n e a t t r ib u t e a r e given in F igur e
31.
7.17 Array Ordering
T he encodings for t he va lues of t he or der a t t r ibu t es of a r r a ys is given in F igur e 32 .
7.18 Discriminant Lists
T he descr ipt or s u sed in t he D W _ A T _ d i c s r _ l i s t a t t r ib u t e a r e encoded a s 1- byt e
const a n t s. T he defined va lues a r e pr esen t ed in F igur e 33 .
Tool Interface Standards ( TIS) D WARF S pecification, Version 2.0 81
-- --
____________________________________________________
__I_n_lin
___e_C __ode ____N__a_m__e___________________________Va ___lu_e__
DW_INL_not_inlined 0
DW_INL_inlined 1
DW_INL_declared_not_inlined 2
__D__W____I_N__L____d_e__c_l__a_r__e_d____i__n_l__i_n__e_d___________3______
Figure 31. I nline encodings
___________________________________
_ _O_r_d_e_r_in __g__n_a_m__e______________Va ___lu_e__
DW_ORD_row_major 0
_ _D_W____O__R_D____c__o_l____m__a_j__o_r_____1______
Figure 32. O r der ing encodings
_____________________________
_ _D_e_scr
___ip__t or
___N __a_m__e______Va___lu_e__
DW_DSC_label 0
_ _D_W____D__S_C____r__a_n__g_e_____1______
Figure 33. Discr imina nt descr ipt or encodin gs
7.19 N ame Lookup Table
E a ch set of ent r ies in t he t a ble of globa l na mes cont a ined in t he . d e b u g _ p u b n a m e s
sect ion begins with a hea der consist ing of: a 4- b yt e lengt h cont a in ing t h e len gt h of t h e set
of en t r ies for t h is com pila t ion u n it , not inc lu d in g t h e len gt h field it self ; a 2- b yt e ver sion
iden t ifier cont a in ing t h e va lu e 2 for D W A R F Ver sion 2; a 4- byt e offset in t o t he
. d e b u g _ i n f o sect ion; a n d a 4- b yt e lengt h cont a in ing t h e size in byt es of t h e cont en t s
of t he . d e b u g _ i n f o sect ion gener a t ed t o r epr esen t t h is compila t ion unit . T h is hea der
is f ollowed by a ser ies of t u ples. E a ch t u ple consist s of a 4- b yt e offset f ollowed by a str ing
of non-nu ll byt es t er m ina t ed by one nu ll b yt e. E a ch set is t er mina t ed by a 4- byt e wor d
cont a ining t he va lue 0.
7.20 Address Range Table
E a ch set of ent r ies in t he t a ble of a ddr ess r a nges cont a ined in t he . d e b u g _ a r a n g e s
sect ion begins with a hea der consist ing of: a 4- b yt e lengt h cont a in ing t h e len gt h of t h e set
of en t r ies for t h is com pila t ion u n it , not inc lu d in g t h e len gt h field it self ; a 2- b yt e ver sion
iden t ifier cont a in ing t h e va lu e 2 for D W A R F Ver sion 2; a 4- byt e offset in t o t he
. d e b u g _ i n f o sect ion; a 1-b yt e u n signed in t eger c ont a ining t he size in byt es of a n
a ddr ess ( or t he offset por t ion of a n a ddr ess for segm en t ed a d dr essing) on t he t a r ge t syst em ;
a nd a 1- byt e u n signed int eger cont a ining t he size in b yt es of a segmen t descr ip t or on t he
t a r ge t system . T h is hea der is f ollowed by a ser ies of t u ple s. E a ch t u ple consist s of a n
a ddr ess a n d a len gt h , ea ch in t he size a ppr opr ia t e for a n a ddr ess on t he t a r get a r ch it ect ur e.
T he fir st t u ple f ollowing t he hea der in ea ch set begins a t a n offset t h a t is a mu lt iple of t h e
size of a single t u ple ( t h a t is, t wice t h e size of a n a ddr ess) . T he hea der is pa dded , if
necessa r y, t o t he a ppr opr ia t e boun da r y. E a ch set of t u ples is t er m ina t ed by a 0 f or t he
a ddr ess a n d 0 for t he len gt h .
7.21 Line N umber Information
T he sizes of t he in t eger s used in t he line nu mber a nd ca ll fr a m e informa t ion sec t ions a r e a s
follows:
8. FU TU RE D IRECTION S
T he U N I X I n t er na t iona l P r ogr a m ming L a n gua ges SI G is wor king on a specifica t ion for a
set of int er fa ces f or r ea d ing D W A R F infor m a t ion, t h a t will hide cha nges in t h e
r epr esen t a t ion of t ha t infor m a t ion fr om it s consumer s. I t is hoped t ha t u sing t hese
int er fa ces will m a ke t h e t r a n sit ion f r om D W A R F Ver sion 1 t o Ver sion 2 m u c h sim pler a n d
will ma ke it ea sier for a single consumer t o suppor t object s u sing e it her Ver sion 1 or
Ver sion 2 D W A R F .
A dr a ft of t h is specifica t ion is a va ila ble for r eview fr om U N I X I n t er na t iona l. T h e
P r ogr a m m ing L a ngu a ges SI G wishes t o str ess, however , t ha t t he specifica t ion is st ill in
flux.
___________________________________________________________________________
__TA___G
__N__AM
____E______________________________AP ___P_LI
___C_A
__BL
___E__AT
___T_R
__IB
__U ___S____
__TE
D W _ T A G _ a c c e s s _ d e c l a r a t i o n DECL†
DW_AT_accessibility
DW_AT_name
___________________________________________D_W ____A
__T__
__s_i
__b_l __g______________
__i_n
D W _ T A G _ a r r a y _ t y p e DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_byte_size
DW_AT_declaration
DW_AT_name
DW_AT_ordering
DW_AT_sibling
DW_AT_start_scope
DW_AT_stride_size
DW_AT_type
___________________________________________D_W ____A
__T__
__v_i
__s_i
__b_i
__l_i
__t_y
__________
DW _ T A G _ b a s e _ t y p e DW_AT_bit_offset
DW_AT_bit_size
DW_AT_byte_size
DW_AT_encoding
DW_AT_name
___________________________________________D_W ____A
__T__
__s_i
__b_l
__i_n
__g______________
DW_TAG_catch_block DW_AT_abstract_origin
DW_AT_high_pc
DW_AT_low_pc
DW_AT_segment
___________________________________________D_W ____A
__T__
__s_i
__b_l __g______________
__i_n
† D W _ A T _ d e c l _ c o l u m n, D W _ A T _ d e c l _ f i l e, D W _ A T _ d e c l _ l i n e.
_________________________________________________________________________
__TA ___G__N__AM
___E
___________________________AP ___P__LI
__C__A_BL
___E__AT
___T__R_IB ___S______
___U_TE
D W _ T A G _ c l a s s _ t y p e DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_byte_size
DW_AT_declaration
DW_AT_name
DW_AT_sibling
DW_AT_start_scope
_______________________________________D __W__
__A_T
____v__i_s
__i_b
__i_l __y___________
__i_t
D W _ T A G _ c o m m o n _ b l o c k DECL
DW_AT_declaration
DW_AT_location
DW_AT_name
DW_AT_sibling
_______________________________________D __W__
__A_T
____v__i_s
__i_b
__i_l __y___________
__i_t
D W _ T A G _ c o m m o n _ i n c l u s i o n DECL
DW_AT_common_reference
DW_AT_declaration
DW_AT_sibling
_________________________________________________________________________
D W _ A T _ v i s i b i l i t y
DW _ TA G _ co m pi l e _u n i t DW_AT_base_types
DW_AT_comp_dir
DW_AT_identifier_case
DW_AT_high_pc
DW_AT_language
DW_AT_low_pc
DW_AT_macro_info
DW_AT_name
DW_AT_producer
DW_AT_sibling
_ ______________________________________D __W__
__A_T
____s__t_m
__t__
__l_i
__s_t_____________
DW_TAG_const_type DW_AT_sibling
_ ______________________________________D __W__
__A_T____t __e____________________
__y_p
________________________________________________________________________
__TA ___G
__N
__AM
____E___________________________AP ___P_LI
___C_A__BL
___E__AT
___T_R
__IB
__U ___S____
__TE
D W _ T A G _ c o n s t a n t DECL
DW_AT_accessibility
DW_AT_constant_value
DW_AT_declaration
DW_AT_external
DW_AT_name
DW_AT_sibling
DW_AT_start_scope
DW_AT_type
________________________________________________________________________
D W _ A T _ v i s i b i l i t y
D W _ T A G _ e n t r y _ p o i n t DW_AT_address_class
DW_AT_low_pc
DW_AT_name
DW_AT_return_addr
DW_AT_segment
DW_AT_sibling
DW_AT_static_link
________________________________________D_W ____A
__T__
__t_y ___________________
__p_e
D W _ T A G _ e n u m e r a t i o n _ t y p e DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_byte_size
DW_AT_declaration
DW_AT_name
DW_AT_sibling
DW_AT_start_scope
________________________________________D_W ____A
__T__
__v_i__s_i
__b_i
__l_i
__t_y
__________
DW _ TA G _ en u me r a to r DECL
DW_AT_const_value
DW_AT_name
________________________________________D_W ____A
__T__
__s_i__b_l
__i_n
__g______________
DW_TAG_file_type DECL
DW_AT_abstract_origin
DW_AT_byte_size
DW_AT_name
DW_AT_sibling
DW_AT_start_scope
DW_AT_type
________________________________________D_W ____A
__T____v_i
__s_i
__b_i
__l_i
__t_y__________
_____________________________________________________________________________________
__TA ___G__N__AM
___E
_________________________________AP ___P__LI
__C__A_BL
___E__AT
___T__R_IB ___S____________
___U_TE
D W _ T A G _ f o r m a l _ p a r a m e t e r DECL
DW_AT_abstract_origin
DW_AT_artificial
DW_AT_default_value
DW_AT_is_optional
DW_AT_location
DW_AT_name
DW_AT_segment
DW_AT_sibling
DW_AT_type
_____________________________________________________________________________________
D W _ A T _ v a r i a b l e _ p a r a m e t e r
D W _ T A G _ f r i e n d DECL
DW_AT_abstract_origin
DW_AT_friend
_____________________________________________D __W__
__A_T
____s__i_b__l_i ______________________
__n_g
D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n DECL
DW_AT_accessibility
DW_AT_import
DW_AT_name
DW_AT_sibling
_____________________________________________D __W__
__A_T
____s__t_a__r_t
____s
__c_o
__p_e________________
D W _ T A G _ i n h e r i t a n c e DECL
DW_AT_accessibility
DW_AT_data_member_location
DW_AT_sibling
DW_AT_type
_____________________________________________D __W__
__A_T
____v__i_r__t_u
__a_l
__i_t__y_________________
D W _ T A G _ i n l i n e d _ s u b r o u t i n e DECL
DW_AT_abstract_origin
DW_AT_high_pc
DW_AT_low_pc
DW_AT_segment
DW_AT_sibling
DW_AT_return_addr
_____________________________________________D __W__
__A_T____s__t_a
__r_t
____s
__c_o__p_e
________________
DW_TAG_label DW_AT_abstract_origin
DW_AT_low_pc
DW_AT_name
DW_AT_segment
DW_AT_start_scope
_ ____________________________________________D __W__
__A_T____s__i_b
__l_i ______________________
__n_g
___________________________________________________________________________
__TA ___G
__N__AM
____E______________________AP ___P__LI__C__A_BL
___E__AT___T__R_IB ___S____________
___U_TE
D W _ T A G _ l e x i c a l _ b l o c k DW_AT_abstract_origin
DW_AT_high_pc
DW_AT_low_pc
DW_AT_name
DW_AT_segment
___________________________________D __W__
__A_T____s__i_b
__l_i__n_g
______________________
D W _ T A G _ m e m b e r DECL
DW_AT_accessibility
DW_AT_byte_size
DW_AT_bit_offset
DW_AT_bit_size
DW_AT_data_member_location
DW_AT_declaration
DW_AT_name
DW_AT_sibling
DW_AT_type
___________________________________D __W____A_T
____v__i_s__i_b
__i_l
__i_t
__y_________________
D W _ T A G _ m o d u l e DECL
DW_AT_accessibility
DW_AT_declaration
DW_AT_high_pc
DW_AT_low_pc
DW_AT_name
DW_AT_priority
DW_AT_segment
DW_AT_sibling
___________________________________D __W____A_T
____v__i_s__i_b
__i_l
__i_t__y_________________
D W _ T A G _ n a m e l i s t DECL
DW_AT_accessibility
DW_AT_abstract_origin
DW_AT_declaration
DW_AT_sibling
___________________________________D __W____A_T
____v__i_s__i_b
__i_l
__i_t__y_________________
DW_TAG_namelist_item DECL
DW_AT_namelist_item
___________________________________D __W____A_T____s
__i_b__l_i
__n_g
______________________
DW_TAG_packed_type DW_AT_sibling
___________________________________D ________________________________________
W _ A T _ t y p e
___________________________________________________________________________
__TA___G
__N__AM
____E______________________________AP ___P_LI
___C_A__BL
___E__AT
___T_R
__IB
__U ___S____
__TE
D W _ T A G _ p o i n t e r _ t y p e DW_AT_address_class
DW_AT_sibling
___________________________________________D_W ____A
__T__
__t_y ___________________
__p_e
D W _ T A G _ p t r _ t o _ m e m b e r _ t y p e DECL
DW_AT_abstract_origin
DW_AT_address_class
DW_AT_containing_type
DW_AT_declaration
DW_AT_name
DW_AT_sibling
DW_AT_type
DW_AT_use_location
___________________________________________D_W ____A
__T__
__v_i__s_i
__b_i
__l_i __________
__t_y
D W _ T A G _ r e f e r e n c e _ t y p e DW_AT_address_class
DW_AT_sibling
___________________________________________D_W ____A
__T__
__t_y__p_e
___________________
D W _ T A G _ s e t _ t y p e DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_byte_size
DW_AT_declaration
DW_AT_name
DW_AT_start_scope
DW_AT_sibling
DW_AT_type
___________________________________________D_W ____A
__T__
__v_i__s_i
__b_i
__l_i
__t_y
__________
DW_TAG_string_type DECL
DW_AT_accessibility
DW_AT_abstract_origin
DW_AT_byte_size
DW_AT_declaration
DW_AT_name
DW_AT_segment
DW_AT_sibling
DW_AT_start_scope
DW_AT_string_length
___________________________________________D_W ____A
__T____v_i
__s_i
__b_i
__l_i
__t_y__________
____________________________________________________________________________
__TA___G__N__AM
___E
________________________AP ___P__LI
__C
__A_BL
___E__AT
___T__R_IB ___S____________
___U_TE
D W _ T A G _ s t r u c t u r e _ t y p e DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_byte_size
DW_AT_declaration
DW_AT_name
DW_AT_sibling
DW_AT_start_scope
____________________________________D __W__
__A_T
____v
__i_s
__i_b
__i_l __y_________________
__i_t
D W _ T A G _ s u b p r o g r a m DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_address_class
DW_AT_artificial
DW_AT_calling_convention
DW_AT_declaration
DW_AT_external
DW_AT_frame_base
DW_AT_high_pc
DW_AT_inline
DW_AT_low_pc
DW_AT_name
DW_AT_prototyped
DW_AT_return_addr
DW_AT_segment
DW_AT_sibling
DW_AT_specification
DW_AT_start_scope
DW_AT_static_link
DW_AT_type
DW_AT_visibility
DW_AT_virtuality
_ ___________________________________D __W__
__A_T
____v
__t_a
__b_l
__e__
__e_l
__e_m
____l
__o_c
__a_t __n__
__i_o
______________________________________________________________________________
__TA ___G
__N__AM
____E_________________________________AP ___P_LI
___C_A__BL
___E__AT
___T_R
__IB
__U ___S____
__TE
D W _ T A G _ s u b r a n g e _ t y p e DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_byte_size
DW_AT_count
DW_AT_declaration
DW_AT_lower_bound
DW_AT_name
DW_AT_sibling
DW_AT_type
DW_AT_upper_bound
______________________________________________D_W ____A
__T__
__v_i__s_i
__b_i
__l_i
__t_y
__________
D W _ T A G _ s u b r o u t i n e _ t y p e DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_address_class
DW_AT_declaration
DW_AT_name
DW_AT_prototyped
DW_AT_sibling
DW_AT_start_scope
DW_AT_type
______________________________________________D_W ____A
__T__
__v_i__s_i
__b_i
__l_i
__t_y
__________
D W _ T A G _ t e m p l a t e _ t y p e _ p a r a m DECL
DW_AT_name
DW_AT_sibling
______________________________________________D_W ____A
__T__
__t_y__p_e
___________________
D W _ T A G _ t e m p l a t e _ v a l u e _ p a r a m DECL
DW_AT_name
DW_AT_const_value
DW_AT_sibling
______________________________________________D_W ____A
__T__
__t_y__p_e
___________________
DW _ TA G _ th r ow n _ ty p e DECL
DW_AT_sibling
______________________________________________D_W ____A
__T____t_y
__p_e
___________________
DW_TAG_try_block DW_AT_abstract_origin
DW_AT_high_pc
DW_AT_low_pc
DW_AT_segment
______________________________________________D_W ____A
__T____s_i
__b_l __g______________
__i_n
_________________________________________________________________________________
__TA___G
__N__AM
____E____________________________________AP ___P_LI
___C_A__BL
___E__AT
___T_R
__IB
__U ___S____
__TE
D W _ T A G _ t y p e d e f DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_declaration
DW_AT_name
DW_AT_sibling
DW_AT_start_scope
DW_AT_type
_________________________________________________D_W ____A
__T__
__v_i__s_i
__b_i
__l_i __________
__t_y
D W _ T A G _ u n i o n _ t y p e DECL
DW_AT_abstract_origin
DW_AT_accessibility
DW_AT_byte_size
DW_AT_declaration
DW_AT_friends
DW_AT_name
DW_AT_sibling
DW_AT_start_scope
_________________________________________________D_W ____A
__T__
__v_i__s_i
__b_i
__l_i __________
__t_y
D W _ T A G _ u n s p e c i f i e d _ p a r a m e t e r s DECL
DW_AT_abstract_origin
DW_AT_artificial
_________________________________________________D_W ____A
__T__
__s_i__b_l __g______________
__i_n
DW_TAG_variable DECL
DW_AT_accessibility
DW_AT_constant_value
DW_AT_declaration
DW_AT_external
DW_AT_location
DW_AT_name
DW_AT_segment
DW_AT_sibling
DW_AT_specification
DW_AT_start_scope
DW_AT_type
_________________________________________________D_W ____A
__T____v_i
__s_i
__b_i
__l_i
__t_y__________
_____________________________________________________________________
__TA___G
__N__AM
____E________________________AP
___P_LI
___C_A
__BL
___E__AT
___T_R
__IB
__U ___S____
__TE
D W _ T A G _ v a r i a n t DECL
DW_AT_accessibility
DW_AT_abstract_origin
DW_AT_declaration
DW_AT_discr_list
DW_AT_discr_value
_____________________________________D_W ____A
__T__
__s_i
__b_l
__i_n
__g______________
D W _ T A G _ v a r i a n t _ p a r t DECL
DW_AT_accessibility
DW_AT_abstract_origin
DW_AT_declaration
DW_AT_discr
DW_AT_sibling
_____________________________________D_W ____A
__T__
__t_y ___________________
__p_e
DW _ TA G _ vo l at i l e_ t y pe DW_AT_sibling
_____________________________________D_W ____A
__T__
__t_y
__p_e
___________________
DW_TAG_with_statement DW_AT_accessibility
DW_AT_address_class
DW_AT_declaration
DW_AT_high_pc
DW_AT_location
DW_AT_low_pc
DW_AT_segment
DW_AT_sibling
DW_AT_type
_____________________________________D_W____A
__T__
__v_i
__s_i
__b_i
__l_i __________
__t_y
4 3
"POINTER" DW_TAG_pointer_type
DW_CHILDREN_no
e2
DW_AT_type DW_FORM_ref4
0 0
0
4
DW_TAG_typedef
DW_CHILDREN_no
C ompila t ion U n it 2 - .d eb ug_info DW_AT_name DW_FORM_string
DW_AT_type DW_FORM_ref4
lengt h 0 0
2
a1 ( abbrevi at ion t abl e off set ) 0
4
...
4
"strp"
e2
...
__p__code
O __________________________________O
__p_er
__a_n_d_____Byt
___e__S_t_r_ea__m__________
DW_LNS_fixed_advance_pc 0x239 0x9, 0x39, 0x2
SPECIAL(2, 0) 0 xb
DW_LNS_fixed_advance_pc 0x3 0x9, 0 x3, 0 x0
SPECIAL(2, 0) 0 xb
DW_LNS_fixed_advance_pc 0x8 0x9, 0 x8, 0 x0
SPECIAL(1, 0) 0 xa
DW_LNS_fixed_advance_pc 0x7 0x9, 0 x7, 0 x0
SPECIAL(1, 0) 0 xa
DW_LNS_fixed_advance_pc 0x2 0x9, 0 x2, 0 x0
DW_LNE_end_sequence 0x0, 0x1, 0x1
IN DEX
I N -1
-- --
E r egist er na m e oper a t or s 10
specia l oper a t ions 15
ent r y point s 25
st a ck 11– 12, 15
decla r a t ions owned by 27
looku p
loca t ions 26
by a d dr ess 49, 77
r et u r n t ypes 26
by na me 49, 77
enu m er a t ions 5, 39, 45
er r or va lu es 65
except ions 5, 28, 32
M
ma cr o infor ma t ion 4, 24, 57, 78
F ba se sour ce en t r ies 58
comma nd line opt ions 58
file t ypes 48
defin e a n d u nd efin e en t r ies 57
fla t a d dr ess spa ce 19
end file en t r ies 58
F or t r a n 3, 27, 35, 46– 47
st a r t file en t r ies 58
F O R T R A N 77 3
ven d or ext ensions 58
F or t r a n90 3, 34– 35
ma in pr ogr a m s 26
fr ien d s 41
mem ber s 30
bit fields 42
da t a 40– 41
I fu nct ions 25, 40, 43
iden t ifier s loca t ions 11, 43
ca se 24, 76 point er s t o 47
na m es 21, 49 st a t ic da t a 33, 40, 49
impor t s 35 M odu la 2 3, 18, 25, 32
inh er it a nce 40 modu les 25
defin it ion 25
pr ior it y 25
L
la bels 31
la ngu a ges 3, 23, 75
N
L E B128 8, 51, 68, 70 na m elist s 35
lexica l b locks 31
line n u m ber infor ma t ion 4, 20, 23, 50, 77
defin it ions 51, 77 O
ext en ded opcodes 52, 56, 78
opt im ized code 10 , 18, 33
gener a l r u les 59
pr ologue 52
specia l opcodes 52, 54
st a n d a r d opcodes 52, 55, 78
P
st a t e ma ch in e r eg ist er s 51 pa r a met er s
loca t ions defa u lt va lu e 34
a r it h met ic oper a t ions 13 for m a l 27, 32– 33, 45
cont r ol flow oper a t ions 14 opt iona l 34
descr ipt ions 4, 10, 19, 41, 72 unspecified 27, 32, 46
exa m ples 15– 16 va r ia ble 34
expr essions 10, 41, 65, 72 P a sca l 3, 32, 40, 46, 48
list s 4, 10, 17, 74 point er s t o m em b er s 47
lit er a l encodings 11 pr e-pr ocessor 4, 57
logica l oper a t ions 13
r egist er ba sed a ddr essing 12
I N -2
-- --
R U
r ecor ds 40 u n ions 33, 40, 42
a n onym ous 33, 41
incomplet e 40
S user -defin ed t ypes 18
scope 34, 37
segm en t ed a ddr ess spa ce 5, 19, 26, 33, 50, 66
set t ypes 46
V
sour ce va r ia ble len gt h da t a 4, 8, 68, 70
colum n s 20, 51 va r ia bles 33
files 20, 23, 51, 53, 56, 58, 78 va r ia nt s 40, 44, 77
lines 20, 51, 57 ven d or ext ensions 4, 58, 60, 65
st r ing t a ble 70 Ver sion 1 3– 4, 10, 66
st r ing t ypes 46 Ver sion 2 3, 10, 66, 78
st r u ct ur es 33, 40 vir t u a l fu nct ions 3, 19, 43
der ived 40 vir t u a lit y 19, 41, 43, 75
incomplet e 40 visibilit y 18, 75
subr a nges 39, 46
subr out ines 19, 25
decla r a t ions owned by 27 W
fr a m e ba se 12, 27
wit h st a t em en t s 32
inline 28, 76
inlin ed 29
loca t ions 26
mem ber s 25, 43
nest ed 27
ou t -of-lin e 30
pr ot ot ypes 26, 45
r et u r n a ddr esses 27
r et u r n t ypes 26, 45
t ypes 19, 45
T
t a gs 4, 7, 65, 67
t em pla t es 5, 28, 43
t r y b locks 32
t ype modifier s 18, 38
t yped efs 38
t ypes
ba se 18, 24, 37, 65, 74
const a n t 18, 38
modifier s 18, 38
pa ck ed 18, 38
point er 18– 19, 38
r efer ence 18– 19, 38
user -defin ed 18
vola t ile 18, 38
I N -3