]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
debug/elf: Don't crash if line numbers are not available.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 9 Mar 2012 05:33:10 +0000 (05:33 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 9 Mar 2012 05:33:10 +0000 (05:33 +0000)
From-SVN: r185124

libgo/go/debug/elf/runtime.go

index 23e79bff5db2f354d69d416b94ec830d2974b7a5..17cb6fbc99efd28ab8141f09cd974d843c8fd2cb 100644 (file)
@@ -129,7 +129,7 @@ func openExecutable() {
 // and line number for a PC value.
 func funcFileLine(pc uintptr, function *string, file *string, line *int) bool {
        openExecutable()
-       if executable.dwarf == nil {
+       if executable == nil || executable.dwarf == nil {
                return false
        }
        f, ln, err := executable.dwarf.FileLine(uint64(pc))