Skip to content

Commit

Permalink
proc: discard variables with address 0 in disassembly sym lookup (#1668)
Browse files Browse the repository at this point in the history
They are irrelevant and confusing.
  • Loading branch information
aarzilli authored and derekparker committed Aug 14, 2019
1 parent 327fbdb commit a3e884e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/proc/bininfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ func (bi *BinaryInfo) symLookup(addr uint64) (string, uint64) {
// report previous variable + offset if i-th variable starts after addr
i--
}
if i > 0 {
if i >= 0 && bi.packageVars[i].addr != 0 {
return bi.packageVars[i].name, bi.packageVars[i].addr
}
return "", 0
Expand Down

0 comments on commit a3e884e

Please sign in to comment.