提交 7847e94c 编写于 作者: D Derek Parker

proc: Small refactor

上级 971d7968
...@@ -186,9 +186,8 @@ func (dbp *Process) FindFunctionLocation(funcName string, firstLine bool, lineOf ...@@ -186,9 +186,8 @@ func (dbp *Process) FindFunctionLocation(funcName string, firstLine bool, lineOf
if len(lines) > 0 { if len(lines) > 0 {
linePC, _, err := dbp.goSymTable.LineToPC(filename, lines[0]) linePC, _, err := dbp.goSymTable.LineToPC(filename, lines[0])
return linePC, err return linePC, err
} else {
return fn.Entry, nil
} }
return fn.Entry, nil
} else if lineOffset > 0 { } else if lineOffset > 0 {
filename, lineno, _ := dbp.goSymTable.PCToLine(fn.Entry) filename, lineno, _ := dbp.goSymTable.PCToLine(fn.Entry)
breakAddr, _, err := dbp.goSymTable.LineToPC(filename, lineno+lineOffset) breakAddr, _, err := dbp.goSymTable.LineToPC(filename, lineno+lineOffset)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册