aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-03-13 14:04:29 -0700
committerKeith Randall <khr@golang.org>2014-03-13 14:04:29 -0700
commit4c6d2d6aa8aff8876a511882dd2a1facf4965667 (patch)
tree6c47e50913645803ae89b4dd319621ecd9122262 /src/pkg/debug
parent41aa887be5981844a425c8c71aa7e24cea21a258 (diff)
downloadgo-4c6d2d6aa8aff8876a511882dd2a1facf4965667.tar.xz
debug/macho: handle missing __debug_str section
debug/elf does the same thing, use []byte{} for any missing sections. Fixes #7510 LGTM=rsc R=golang-codereviews, iant CC=golang-codereviews, rsc https://golang.org/cl/75230043
Diffstat (limited to 'src/pkg/debug')
-rw-r--r--src/pkg/debug/macho/file.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pkg/debug/macho/file.go b/src/pkg/debug/macho/file.go
index 2b19f7f658..eefb744442 100644
--- a/src/pkg/debug/macho/file.go
+++ b/src/pkg/debug/macho/file.go
@@ -11,7 +11,6 @@ import (
"bytes"
"debug/dwarf"
"encoding/binary"
- "errors"
"fmt"
"io"
"os"
@@ -481,7 +480,7 @@ func (f *File) DWARF() (*dwarf.Data, error) {
name = "__debug_" + name
s := f.Section(name)
if s == nil {
- return nil, errors.New("missing Mach-O section " + name)
+ continue
}
b, err := s.Data()
if err != nil && uint64(len(b)) < s.Size {