diff options
Diffstat (limited to 'src/pkg/debug/dwarf/open.go')
| -rw-r--r-- | src/pkg/debug/dwarf/open.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pkg/debug/dwarf/open.go b/src/pkg/debug/dwarf/open.go index 7579892529..c1b3f37aca 100644 --- a/src/pkg/debug/dwarf/open.go +++ b/src/pkg/debug/dwarf/open.go @@ -26,6 +26,7 @@ type Data struct { abbrevCache map[uint32]abbrevTable order binary.ByteOrder typeCache map[Offset]Type + typeSigs map[uint64]*typeUnit unit []unit } @@ -49,6 +50,7 @@ func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Dat str: str, abbrevCache: make(map[uint32]abbrevTable), typeCache: make(map[Offset]Type), + typeSigs: make(map[uint64]*typeUnit), } // Sniff .debug_info to figure out byte order. @@ -75,3 +77,11 @@ func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Dat d.unit = u return d, nil } + +// AddTypes will add one .debug_types section to the DWARF data. A +// typical object with DWARF version 4 debug info will have multiple +// .debug_types sections. The name is used for error reporting only, +// and serves to distinguish one .debug_types section from another. +func (d *Data) AddTypes(name string, types []byte) error { + return d.parseTypes(name, types) +} |
