delve/pkg/proc/core
aarzilli 438e51f330 proc: replace SavedRegisters interface with a Copy method
Fncall.go was written with the assumption that the object returned by
proc.Thread.Registers does not change after we call
proc.Thread.SetPC/etc.

This is true for the native backend but not for gdbserial. I had
anticipated this problem and introduced the Save/SavedRegisters
mechanism during the first implementation of fncall.go but that's
insufficient.

Instead:

1. clarify that the object returned by proc.Thread.Registers could
   change when the CPU registers are modified.
2. add a Copy method to Registers that returns a copy of the registers
   that are guaranteed not to change when the CPU registers change.
3. remove the Save/SavedRegisters mechanism.

This solution leaves us the option, in the future, to cache the output
of proc.(Thread).Registers, avoiding a system call every time it's
called.
2018-08-30 15:48:10 -07:00
..
core_test.go proc,service,terminal: read defer list 2018-07-24 14:58:56 -07:00
core.go proc: replace SavedRegisters interface with a Copy method 2018-08-30 15:48:10 -07:00
linux_amd64_core.go *: function call injection for go 1.11 2018-07-13 13:37:54 -07:00