aboutsummaryrefslogtreecommitdiff
path: root/src/debug/macho/file.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2022-02-11 14:58:56 +0000
committerCherry Mui <cherryyz@google.com>2022-02-11 14:58:56 +0000
commite90b835f3071f1eb71810a3631b792f23df59f24 (patch)
treedc5a1c1620f14dbc051402095af9c024bc12a202 /src/debug/macho/file.go
parentbb93480d009322886df6f5185c988d6d21fdc2c8 (diff)
parent0a6cf8706fdd0fe1bd26e4d1ecbcd41650bf5e6c (diff)
downloadgo-e90b835f3071f1eb71810a3631b792f23df59f24.tar.gz
go-e90b835f3071f1eb71810a3631b792f23df59f24.zip
[dev.boringcrypto.go1.16] all: merge go1.16.14 into dev.boringcrypto.go1.16
Change-Id: I186a567b3e76df7ecf1842634a3851eab7c9dfce
Diffstat (limited to 'src/debug/macho/file.go')
-rw-r--r--src/debug/macho/file.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/debug/macho/file.go b/src/debug/macho/file.go
index 73cfce3c76..cdc500e476 100644
--- a/src/debug/macho/file.go
+++ b/src/debug/macho/file.go
@@ -650,10 +650,14 @@ func (f *File) DWARF() (*dwarf.Data, error) {
return nil, err
}
- // Look for DWARF4 .debug_types sections.
+ // Look for DWARF4 .debug_types sections and DWARF5 sections.
for i, s := range f.Sections {
suffix := dwarfSuffix(s)
- if suffix != "types" {
+ if suffix == "" {
+ continue
+ }
+ if _, ok := dat[suffix]; ok {
+ // Already handled.
continue
}
@@ -662,7 +666,11 @@ func (f *File) DWARF() (*dwarf.Data, error) {
return nil, err
}
- err = d.AddTypes(fmt.Sprintf("types-%d", i), b)
+ if suffix == "types" {
+ err = d.AddTypes(fmt.Sprintf("types-%d", i), b)
+ } else {
+ err = d.AddSection(".debug_"+suffix, b)
+ }
if err != nil {
return nil, err
}