delve/pkg/terminal
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
..
starbind proc,service: allow printing registers for arbitrary frames (#1875) 2020-02-24 10:47:02 -08:00
command_test.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
command.go proc,terminal: Implement reverse step, next and stepout (#1785) 2020-03-11 15:40:41 -07:00
config.go pkg/terminal: tolerate spurious spaces between arguments of cli. 2020-01-20 10:47:56 -08:00
disasmprint.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
docgen.go terminal: divide commands into categories 2020-03-09 10:11:21 -07:00
groups.go terminal: divide commands into categories 2020-03-09 10:11:21 -07:00
starlark_test.go test: skip failed tests on arm64 2019-11-27 11:07:31 -08:00
starlark.go terminal: adds embedded scripting language (#1466) 2019-07-02 10:55:27 -07:00
terminal_other.go Move top-level packages into pkg 2017-02-08 12:17:19 -08:00
terminal_test.go terminal: prompt to kill remote if process exited (#1621) 2019-07-17 15:54:15 -07:00
terminal_windows.go Move top-level packages into pkg 2017-02-08 12:17:19 -08:00
terminal.go pkg/terminal: Fix exit status 2019-12-03 08:39:07 +01:00