没有合适的资源?快使用搜索试试~ 我知道了~
DWARF格式 最新版本V4
需积分: 10 9 下载量 201 浏览量
2010-06-29
14:21:21
上传
评论 1
收藏 2.61MB PDF 举报
温馨提示
试读
325页
The DWARF Debugging Information Format Committee is open to compiler and debugger developers who have experience with source language debugging and debugging formats, and have an interest in promoting or extending the DWARF debugging format.
资源推荐
资源详情
资源评论
DWARF Debugging Information Format, Version 4
Copyright © 2010 DWARF Debugging Information Format Committee
Permission is granted to copy, distribute and/or modify this document under the terms of the
GNU Free Documentation License, Version 1.3; with no Invariant Sections, with no Front-Cover
Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled
“GNU Free Documentation License”.
This document is based in part on the DWARF Debugging Information Format, Version 2,
which contained the following notice:
UNIX International
Programming Languages SIG
Revision: 2.0.0 (July 27, 1993)
Copyright © 1992, 1993 UNIX International, Inc.
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 prior
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.
This document is further based on the DWARF Debugging Information Format, Version 3,
which is subject to the GNU Free Documentation License.
Trademarks:
Intel386 is a trademark of Intel Corporation.
Java is a trademark of Sun Microsystems, Inc.
All other trademarks found herein are property of their respective owners.
INTRODUCTION
June 10, 2010 Page iii
Table of Contents
DWARF DEBUGGING INFORMATION FORMAT VERSION 4......................................................................I
1 INTRODUCTION..............................................................................................................................................1
1.1 PURPOSE AND SCOPE ...........................................................................................................................................1
1.2 OVERVIEW...........................................................................................................................................................1
1.3 VENDOR EXTENSIBILITY......................................................................................................................................2
1.4 CHANGES FROM VERSION 3 TO VERSION 4..........................................................................................................3
1.5 CHANGES FROM VERSION 2 TO VERSION 3..........................................................................................................4
1.6 CHANGES FROM VERSION 1 TO VERSION 2..........................................................................................................5
2 GENERAL DESCRIPTION .............................................................................................................................7
2.1 THE DEBUGGING INFORMATION ENTRY (DIE)....................................................................................................7
2.2 ATTRIBUTE TYPES ...............................................................................................................................................7
2.3 RELATIONSHIP OF DEBUGGING INFORMATION ENTRIES ....................................................................................16
2.4 TARGET ADDRESSES..........................................................................................................................................16
2.5 DWARF EXPRESSIONS .....................................................................................................................................17
2.5.1 General Operations...................................................................................................................................17
2.5.2 Example Stack Operations ........................................................................................................................25
2.6 LOCATION DESCRIPTIONS..................................................................................................................................25
2.6.1 Single Location Descriptions ....................................................................................................................26
2.6.2 Location Lists............................................................................................................................................30
2.7 TYPES OF PROGRAM ENTITIES ...........................................................................................................................32
2.8 ACCESSIBILITY OF DECLARATIONS....................................................................................................................32
2.9 VISIBILITY OF DECLARATIONS...........................................................................................................................33
2.10 VIRTUALITY OF DECLARATIONS......................................................................................................................33
2.11 ARTIFICIAL ENTRIES........................................................................................................................................34
2.12 SEGMENTED ADDRESSES .................................................................................................................................34
2.13 NON-DEFINING DECLARATIONS AND COMPLETIONS .......................................................................................35
2.13.1 Non-Defining Declarations.....................................................................................................................35
2.13.2 Declarations Completing Non-Defining Declarations............................................................................36
2.14 DECLARATION COORDINATES .........................................................................................................................36
2.15 IDENTIFIER NAMES ..........................................................................................................................................36
2.16 DATA LOCATIONS AND DWARF PROCEDURES...............................................................................................37
2.17 CODE ADDRESSES AND RANGES......................................................................................................................37
2.17.1 Single Address.........................................................................................................................................38
2.17.2 Contiguous Address Range .....................................................................................................................38
2.17.3 Non-Contiguous Address Ranges............................................................................................................38
2.18 ENTRY ADDRESS .............................................................................................................................................40
2.19 STATIC AND DYNAMIC VALUES OF ATTRIBUTES.............................................................................................40
2.20 ENTITY DESCRIPTIONS.....................................................................................................................................41
2.21 BYTE AND BIT SIZES........................................................................................................................................41
2.22 LINKAGE NAMES .............................................................................................................................................41
3 PROGRAM SCOPE ENTRIES......................................................................................................................43
3.1 UNIT ENTRIES....................................................................................................................................................43
DWARF Debugging Information Format, Version 4
Page iv June 10, 2010
3.1.1 Normal and Partial Compilation Unit Entries..........................................................................................43
3.1.2 Imported Unit Entries ...............................................................................................................................47
3.1.3 Separate Type Unit Entries .......................................................................................................................48
3.2 MODULE, NAMESPACE AND IMPORTING ENTRIES .............................................................................................48
3.2.1 Module Entries..........................................................................................................................................49
3.2.2 Namespace Entries....................................................................................................................................49
3.2.3 Imported (or Renamed) Declaration Entries ............................................................................................50
3.2.4 Imported Module Entries ..........................................................................................................................51
3.3 SUBROUTINE AND ENTRY POINT ENTRIES .........................................................................................................53
3.3.1 General Subroutine and Entry Point Information.....................................................................................53
3.3.2 Subroutine and Entry Point Return Types.................................................................................................55
3.3.3 Subroutine and Entry Point Locations ......................................................................................................55
3.3.4 Declarations Owned by Subroutines and Entry Points.............................................................................55
3.3.5 Low-Level Information..............................................................................................................................56
3.3.6 Types Thrown by Exceptions.....................................................................................................................57
3.3.7 Function Template Instantiations..............................................................................................................57
3.3.8 Inlinable and Inlined Subroutines.............................................................................................................58
3.3.9 Trampolines ..............................................................................................................................................64
3.4 LEXICAL BLOCK ENTRIES..................................................................................................................................65
3.5 LABEL ENTRIES .................................................................................................................................................65
3.6 WITH STATEMENT ENTRIES...............................................................................................................................66
3.7 TRY AND CATCH BLOCK ENTRIES .....................................................................................................................66
4 DATA OBJECT AND OBJECT LIST ENTRIES ........................................................................................69
4.1 DATA OBJECT ENTRIES......................................................................................................................................69
4.2 COMMON BLOCK ENTRIES.................................................................................................................................73
4.3 NAMELIST ENTRIES ...........................................................................................................................................73
5 TYPE ENTRIES ..............................................................................................................................................75
5.1 BASE TYPE ENTRIES ..........................................................................................................................................75
5.2 UNSPECIFIED TYPE ENTRIES..............................................................................................................................80
5.3 TYPEDEF ENTRIES .............................................................................................................................................82
5.4 ARRAY TYPE ENTRIES .......................................................................................................................................83
5.5 STRUCTURE, UNION, CLASS AND INTERFACE TYPE ENTRIES ............................................................................84
5.5.1 Structure, Union and Class Type Entries..................................................................................................84
5.5.2 Interface Type Entries...............................................................................................................................86
5.5.3 Derived or Extended Structs, Classes and Interfaces................................................................................86
5.5.4 Access Declarations..................................................................................................................................87
5.5.5 Friends ......................................................................................................................................................87
5.5.6 Data Member Entries................................................................................................................................88
5.5.7 Member Function Entries .........................................................................................................................92
5.5.8 Class Template Instantiations ...................................................................................................................93
5.5.9 Variant Entries..........................................................................................................................................94
5.6 CONDITION ENTRIES..........................................................................................................................................95
5.7 ENUMERATION TYPE ENTRIES...........................................................................................................................96
5.8 SUBROUTINE TYPE ENTRIES ..............................................................................................................................97
5.9 STRING TYPE ENTRIES.......................................................................................................................................98
5.10 SET TYPE ENTRIES...........................................................................................................................................98
5.11 SUBRANGE TYPE ENTRIES ...............................................................................................................................99
June 10, 2010 Page v
5.12 POINTER TO MEMBER TYPE ENTRIES.............................................................................................................100
5.13 FILE TYPE ENTRIES........................................................................................................................................101
5.14 DYNAMIC TYPE PROPERTIES .........................................................................................................................102
5.14.1 Data Location .......................................................................................................................................102
5.14.2 Allocation and Association Status.........................................................................................................102
5.15 TEMPLATE ALIAS ENTRIES ............................................................................................................................103
6 OTHER DEBUGGING INFORMATION...................................................................................................105
6.1 ACCELERATED ACCESS ...................................................................................................................................105
6.1.1 Lookup by Name......................................................................................................................................106
6.1.2 Lookup by Address..................................................................................................................................107
6.2 LINE NUMBER INFORMATION ..........................................................................................................................108
6.2.1 Definitions...............................................................................................................................................109
6.2.2 State Machine Registers..........................................................................................................................109
6.2.3 Line Number Program Instructions ........................................................................................................111
6.2.4 The Line Number Program Header ........................................................................................................112
6.2.5 The Line Number Program .....................................................................................................................115
6.3 MACRO INFORMATION.....................................................................................................................................123
6.3.1 Macinfo Types.........................................................................................................................................123
6.3.2 Base Source Entries ................................................................................................................................125
6.3.3 Macinfo Entries for Command Line Options ..........................................................................................125
6.3.4 General Rules and Restrictions...............................................................................................................125
6.4 CALL FRAME INFORMATION............................................................................................................................126
6.4.1 Structure of Call Frame Information ......................................................................................................127
6.4.2 Call Frame Instructions ..........................................................................................................................131
6.4.3 Call Frame Instruction Usage.................................................................................................................136
6.4.4 Call Frame Calling Address ...................................................................................................................137
7 DATA REPRESENTATION ........................................................................................................................139
7.1 VENDOR EXTENSIBILITY..................................................................................................................................139
7.2 RESERVED VALUES .........................................................................................................................................140
7.2.1 Error Values............................................................................................................................................140
7.2.2 Initial Length Values...............................................................................................................................140
7.3 EXECUTABLE OBJECTS AND SHARED OBJECTS................................................................................................140
7.4 32-BIT AND 64-BIT DWARF FORMATS ..........................................................................................................140
7.5 FORMAT OF DEBUGGING INFORMATION ..........................................................................................................143
7.5.1 Unit Headers...........................................................................................................................................143
7.5.2 Debugging Information Entry.................................................................................................................145
7.5.3 Abbreviations Tables...............................................................................................................................145
7.5.4 Attribute Encodings.................................................................................................................................146
7.6 VARIABLE LENGTH DATA ...............................................................................................................................161
7.7 DWARF EXPRESSIONS AND LOCATION DESCRIPTIONS ..................................................................................163
7.7.1 DWARF Expressions...............................................................................................................................163
7.7.2 Location Descriptions .............................................................................................................................167
7.7.3 Location Lists..........................................................................................................................................167
7.8 BASE TYPE ATTRIBUTE ENCODINGS................................................................................................................168
7.9 ACCESSIBILITY CODES ....................................................................................................................................170
7.10 VISIBILITY CODES .........................................................................................................................................171
7.11 VIRTUALITY CODES.......................................................................................................................................171
剩余324页未读,继续阅读
资源评论
mickey_cat
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功