]> Cypherpunks repositories - gostls13.git/commitdiff
debug/dwarf: add flag_present attribute encoding.
authorRobin Eklind <r.eklind.87@gmail.com>
Tue, 19 Feb 2013 16:58:31 +0000 (00:58 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Tue, 19 Feb 2013 16:58:31 +0000 (00:58 +0800)
ref: http://www.dwarfstd.org/doc/DWARF4.pdf

Update #4829

R=minux.ma, iant
CC=dave, golang-dev
https://golang.org/cl/7354043

src/pkg/debug/dwarf/const.go
src/pkg/debug/dwarf/entry.go

index 918b153d07895d3c551bfe5a26c3e793a3c380e7..ad696dc3269514c54facb795043903c14260fa5d 100644 (file)
@@ -207,6 +207,7 @@ const (
        formRef8        format = 0x14
        formRefUdata    format = 0x15
        formIndirect    format = 0x16
+       formFlagPresent format = 0x19
 )
 
 // A Tag is the classification (the type) of an Entry.
index 2885d8fa26cccea2f15259d2bc96da11ebd9fa69..f376e40880bb2ce653e910c31dd940a83775d93f 100644 (file)
@@ -185,6 +185,10 @@ func (b *buf) entry(atab abbrevTable, ubase Offset) *Entry {
                // flag
                case formFlag:
                        val = b.uint8() == 1
+               case formFlagPresent:
+                       // The attribute is implicitly indicated as present, and no value is
+                       // encoded in the debugging information entry itself.
+                       val = true
 
                // reference to other entry
                case formRefAddr: