delve/pkg/proc/gdbserial
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
..
gdbserver_conn.go proc: replace SavedRegisters interface with a Copy method 2018-08-30 15:48:10 -07:00
gdbserver_unix.go proc/native,proc/gdbserial: ignore SIGTTIN, SIGTTOU when fg'ing target 2018-07-31 12:05:54 -07:00
gdbserver_windows.go proc/native,proc/gdbserial: ignore SIGTTIN, SIGTTOU when fg'ing target 2018-07-31 12:05:54 -07:00
gdbserver.go proc: replace SavedRegisters interface with a Copy method 2018-08-30 15:48:10 -07:00
rr_test.go tests: call RunTestsWithFixtures everywhere we use BuildFixture 2018-06-08 11:39:47 -07:00
rr.go proc/native,proc/gdbserial: ignore SIGTTIN, SIGTTOU when fg'ing target 2018-07-31 12:05:54 -07:00