diff --git a/proc/proc.go b/proc/proc.go index b6a76e1c31dbc12d3974b5ab8bd0363f5b9c2222..d3d873d1e7e80ecd8dc55ac8d479ec245e1496e5 100644 --- a/proc/proc.go +++ b/proc/proc.go @@ -186,9 +186,8 @@ func (dbp *Process) FindFunctionLocation(funcName string, firstLine bool, lineOf if len(lines) > 0 { linePC, _, err := dbp.goSymTable.LineToPC(filename, lines[0]) return linePC, err - } else { - return fn.Entry, nil } + return fn.Entry, nil } else if lineOffset > 0 { filename, lineno, _ := dbp.goSymTable.PCToLine(fn.Entry) breakAddr, _, err := dbp.goSymTable.LineToPC(filename, lineno+lineOffset)