delve/pkg/proc/native
Alessandro Arzilli 3b0c886598 proc: next/step/stepout restarts thread from wrong instruction (#1657)
proc.Next and proc.Step will call, after setting their temp
breakpoints, curthread.SetCurrentBreakpoint. This is intended to find
if one of the newly created breakpoints happens to be at the same
instruction that curthread is stopped at.
However SetCurrentBreakpoint is intended to be called after a Continue
and StepInstruction operation so it will also detect if curthread is
stopped one byte after a breakpoint.
If the instruction immediately preceeding the current instruction of
curthread happens to:
 1. have one of the newly created temp breakpoints
 2. be one byte long
SetCurrentBreakpoint will believe that we just hit that breakpoint and
therefore the instruction should be repeated, and thus rewind the PC of
curthread by 1.

We should distinguish between the two uses of SetCurrentBreakpoint and
disable the check for "just hit" breakpoints when inappropriate.

Fixes #1656
2019-08-12 15:11:19 -07:00
..
exc_user_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
exc.h proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00
exec_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
exec_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
mach_exc_user_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
mach_exc.h proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00
nonative_darwin.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
proc_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
proc_darwin.go proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
proc_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
proc_freebsd.c *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
proc_freebsd.go proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
proc_freebsd.h *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
proc_linux.go proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
proc_windows.go proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
proc.go proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
ptrace_darwin.go proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
ptrace_freebsd_amd64.c *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_freebsd_amd64.h *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_freebsd.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_linux.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
registers_darwin_amd64.go proc/gdbserial: do not return floating point regs when not requested (#1497) 2019-02-26 08:53:45 -08:00
registers_freebsd_amd64.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
registers_linux_amd64.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
registers_windows_amd64.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
syscall_windows_amd64.go proc: move windows register handling code to winutil package 2018-11-21 12:17:16 -08:00
syscall_windows.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
threads_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
threads_darwin.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
threads_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
threads_freebsd.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
threads_linux.go proc/native: fix target program crash caused by call injection (linux) (#1538) 2019-04-25 09:45:37 -07:00
threads_windows.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
threads.go proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
zsyscall_windows.go proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00