Skip to content

Commit 7fdaec6

Browse files
mewmewminux
authored andcommitted
debug/dwarf: add flag_present attribute encoding.
ref: http://www.dwarfstd.org/doc/DWARF4.pdf Update #4829 R=minux.ma, iant CC=dave, golang-dev https://golang.org/cl/7354043
1 parent 937f91e commit 7fdaec6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/pkg/debug/dwarf/const.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ const (
207207
formRef8 format = 0x14
208208
formRefUdata format = 0x15
209209
formIndirect format = 0x16
210+
formFlagPresent format = 0x19
210211
)
211212

212213
// A Tag is the classification (the type) of an Entry.

src/pkg/debug/dwarf/entry.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ func (b *buf) entry(atab abbrevTable, ubase Offset) *Entry {
185185
// flag
186186
case formFlag:
187187
val = b.uint8() == 1
188+
case formFlagPresent:
189+
// The attribute is implicitly indicated as present, and no value is
190+
// encoded in the debugging information entry itself.
191+
val = true
188192

189193
// reference to other entry
190194
case formRefAddr:

0 commit comments

Comments
 (0)