delve/pkg/proc
Alessandro Arzilli 1a9e38aa0c
proc,terminal: Implement reverse step, next and stepout (#1785)
* proc: move defer breakpoint code into a function

Moves the code that sets a breakpoint on the first deferred function,
used by both next and StepOut, to its function.

* proc: implement reverse step/next/stepout

When the direction of execution is reversed (on a recording) Step, Next and
StepOut will behave similarly to their forward version. However there are
some subtle interactions between their behavior, prologue skipping, deferred
calls and normal calls. Specifically:

- when stepping backwards we need to set a breakpoint on the first
  instruction after each CALL instruction, once this breakpoint is reached we
  need to execute a single StepInstruction operation to reverse step into the
  CALL.
- to insure that the prologue is skipped reverse next needs to check if it
  is on the first instruction after the prologue, and if it is behave like
  reverse stepout.
- there is no reason to set breakpoints on deferred calls when reverse
  nexting or reverse stepping out, they will never be hit.
- reverse step out should generally place its breakpoint on the CALL
  instruction that created the current stack frame (which will be the CALL
  instruction immediately preceding the instruction at the return address).
- reverse step out needs to treat panic calls and deferreturn calls
  specially.

* service,terminal: implement reverse step, next, stepout
2020-03-11 15:40:41 -07:00
..
core proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
fbsdutil pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
gdbserial proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
linutil pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
native proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
test tests: disable function call injection tests on macOS on Travis-CI 2020-01-02 09:20:12 -08:00
winutil proc: only format registers value when it's necessary (#1860) 2020-02-12 13:31:48 -08:00
amd64_arch.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
amd64_disasm.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
arch.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
arm64_arch.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
arm64_disasm.go proc: build disassemblers unconditionally 2020-01-02 09:29:01 -08:00
bininfo.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
breakpoints.go proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
disasm.go pkg/proc: Judge the validity of addr ranges when disasm. (#1872) 2020-02-19 08:46:03 -08:00
doc.go Move top-level packages into pkg 2017-02-08 12:17:19 -08:00
dwarf_expr_test.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
eval.go pkg/proc: Allow function calls on non-struct types 2020-02-20 10:31:48 +01:00
fncall.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
goroutine_cache.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
i386_arch.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
i386_disasm.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
interface.go proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
mem.go More Function Calls, parts 2 (#1504) 2019-05-30 08:08:37 -07:00
moduledata.go proc: support DW_AT_go_package_name (#1757) 2019-11-25 09:10:18 -08:00
pe.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
proc_general_test.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
proc_linux_test.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
proc_test.go proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
proc_unexported_test.go proc: allow calls to optimized functions (#1684) 2019-09-25 10:23:02 -07:00
proc_unix_test.go pkg/proc: Introduce Target and remove CommonProcess (#1834) 2020-01-21 12:41:24 -08:00
proc.go proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
registers.go proc: only format registers value when it's necessary (#1860) 2020-02-12 13:31:48 -08:00
scope_test.go pkg/proc: Introduce Target and remove CommonProcess (#1834) 2020-01-21 12:41:24 -08:00
stack.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
target.go proc: cache result of GetG (#1921) 2020-03-10 12:48:46 -07:00
threads.go proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
types.go proc: remove support for parsing interfaces in Go 1.8 and earlier (#1878) 2020-02-20 10:52:48 -08:00
variable_test.go pkg/proc: Introduce Target and remove CommonProcess (#1834) 2020-01-21 12:41:24 -08:00
variables.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
x86_disasm.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00