debug/elf: Don't crash if line numbers are not available.
From-SVN: r185124
This commit is contained in:
parent
cc8459239b
commit
060b4284aa
|
@ -129,7 +129,7 @@ func openExecutable() {
|
||||||
// and line number for a PC value.
|
// and line number for a PC value.
|
||||||
func funcFileLine(pc uintptr, function *string, file *string, line *int) bool {
|
func funcFileLine(pc uintptr, function *string, file *string, line *int) bool {
|
||||||
openExecutable()
|
openExecutable()
|
||||||
if executable.dwarf == nil {
|
if executable == nil || executable.dwarf == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
f, ln, err := executable.dwarf.FileLine(uint64(pc))
|
f, ln, err := executable.dwarf.FileLine(uint64(pc))
|
||||||
|
|
Loading…
Reference in New Issue