提交 b31575b5 编写于 作者: D Derek Parker

Refactor: condense code for looking at current fn

上级 53fc8911
......@@ -386,13 +386,12 @@ func (dbp *Process) Continue() error {
if dbp.CurrentThread != thread {
dbp.SwitchThread(thread.Id)
}
pc, err := thread.PC()
loc, err := thread.Location()
if err != nil {
return err
}
// Check to see if we hit a runtime.breakpoint
fn := dbp.goSymTable.PCToFunc(pc)
if fn != nil && fn.Name == "runtime.breakpoint" {
if loc.Fn != nil && loc.Fn.Name == "runtime.breakpoint" {
// step twice to get back to user code
for i := 0; i < 2; i++ {
if err = thread.Step(); err != nil {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册