mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 20:53:42 +08:00
proc: Don't set fileFound if there's a compileUnit without line section (#2006)
We should not return error directly which set `fileFound` to be true if there's a compileUnit without line section.
This commit is contained in:
@ -521,7 +521,7 @@ func (bi *BinaryInfo) LineToPC(filename string, lineno int) (pcs []uint64, err e
|
||||
fileFound := false
|
||||
var pc uint64
|
||||
for _, cu := range bi.compileUnits {
|
||||
if cu.lineInfo != nil && cu.lineInfo.Lookup[filename] == nil {
|
||||
if cu.lineInfo == nil || cu.lineInfo.Lookup[filename] == nil {
|
||||
continue
|
||||
}
|
||||
fileFound = true
|
||||
|
||||
Reference in New Issue
Block a user