delve/pkg/proc/native
Alessandro Arzilli 0b3c7d80cd proc/native: fix target program crash caused by call injection (linux) (#1538)
RestoreRegisters on linux would also restore FS_BASE and GS_BASE, if
the target goroutine migrated to a different thread during the call
injection this would result in two threads of the target process
pointing to the same TLS area which would greatly confuse the target
runtime, leading to fatal panics with nonsensical stack traces.

Other backends are unaffected:

- native/windows doesn't store the TLS in the same CONTEXT struct as
  the other register values.
- native/darwin doesn't support function calls (and wouldn't store the
  TLS value in the same struct)
- gdbserial/rr doesn't support function calls (because it's a
  recording)
- gsdbserial/lldb extracts the value of TLS by executing code in the
  target process.
2019-04-25 09:45:37 -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 *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
proc_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
proc_linux.go proc,proc/native,proc/gdbserial: initial plugin support (#1413) 2019-03-20 10:32:51 -07:00
proc_windows.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
proc.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
ptrace_darwin.go proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
ptrace_linux.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01: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_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_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 *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
zsyscall_windows.go proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00