pkg,service: Use PCToFunc instead of PCToLine if it only needs func (#1894)

This commit is contained in:
chainhelen
2020-02-25 23:01:37 -06:00
committed by GitHub
parent 23b8e59ab9
commit 7560c33819
4 changed files with 4 additions and 4 deletions

View File

@ -1287,7 +1287,7 @@ func (d *Debugger) Disassemble(goroutineID int, addr1, addr2 uint64, flavour api
}
if addr2 == 0 {
_, _, fn := d.target.BinInfo().PCToLine(addr1)
fn := d.target.BinInfo().PCToFunc(addr1)
if fn == nil {
return nil, fmt.Errorf("address %#x does not belong to any function", addr1)
}