forked from ccoutant/dwarf-locations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
011-generalize-undefined.txt
71 lines (54 loc) · 3.39 KB
/
011-generalize-undefined.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Part 8: Generalize Creation of Undefined Location Descriptions
PROBLEM DESCRIPTION
DWARF 5 uses an empty expression to indicate an undefined location description.
Since [Allow location description on the DWARF evaluation stack] allows location
descriptions to be created on the stack, it is necessary to have an explicit way
to specify an undefined location description.
For example, the DW_OP_select_bit_piece operation proposed in [Operations to
Create Vector Composite Location Descriptions] takes more than one location
description on the stack. Without this ability, it is not possible to specify
that a particular one of the input location descriptions is undefined.
PROPOSED SOLUTION
This proposal depends on proposal [Allow location description on the DWARF
evaluation stack].
In Section 2.5.4 "DWARF Operation Expressions", replace the two occurrences of
the paragraph:
----------------------------------------------------------------------------
[non-normative] This rule is for backwards compatibility with DWARF Version
5 which uses an empty operation expression for this purpose.
----------------------------------------------------------------------------
with:
----------------------------------------------------------------------------
[non-normative] This rule is for backwards compatibility with DWARF Version
5 which has no explicit operation to create an undefined location
description, and uses an empty operation expression for this purpose.
----------------------------------------------------------------------------
Replace section 2.5.4.4.2 "Undefined Location Description Operations" from
[Allow location description on the DWARF evaluation stack] (which in turn
replaces DWARF Version 5 Section 2.6.1.1.1 "Empty Location Descriptions") with:
----------------------------------------------------------------------------
[non-normative] The undefined location storage represents a piece or all of
an object that is present in the source but not in the object code (perhaps
due to optimization). Neither reading nor writing to the undefined location
storage is meaningful.
An undefined location description specifies the undefined location storage.
There is no concept of the size of the undefined location storage, nor of a
bit offset for an undefined location description. The DW_OP_*offset
operations leave an undefined location description unchanged. The
DW_OP_*piece operations can explicitly or implicitly specify an undefined
location description, allowing any size and offset to be specified, and
results in a part with all undefined bits.
1. DW_OP_undefined
DW_OP_undefined pushes a location description L that comprises one
undefined location description SL.
----------------------------------------------------------------------------
Add the following row to table 7.9 in Section "7.7.1 Operation Expressions":
----------------------------------------------------------------------------
------------------- ----- --------- ---------------------------
No. of
Operation Code Operands Notes
------------------- ----- --------- ---------------------------
...
DW_OP_undefined TBA 0
------------------- ----- --------- ---------------------------
----------------------------------------------------------------------------