Commit 060b4284 by Ian Lance Taylor

debug/elf: Don't crash if line numbers are not available.

From-SVN: r185124
parent cc845923
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment