mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 20:20:40 +08:00
Optimize Next implementation
Once the program detects that we have stepped into another function, we simply calculate the return address and then set a breakpoint and continue to that location, avoiding numerous syscalls.
This commit is contained in:
@ -56,7 +56,7 @@ func TestFindReturnAddress(t *testing.T) {
|
||||
syscall.PtracePeekText(p.Pid, uintptr(addr), data)
|
||||
addr = binary.LittleEndian.Uint64(data)
|
||||
|
||||
expected := uint64(0x400f04)
|
||||
expected := uint64(0x400ed4)
|
||||
if addr != expected {
|
||||
t.Fatalf("return address not found correctly, expected %#v got %#v", expected, addr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user