delve/pkg/proc/native
Alessandro Arzilli 2c1a822632
terminal,service,proc/*: adds dump command (gcore equivalent) (#2173)
* proc/core: off-by-one error reading ELF core files

core.(*splicedMemory).ReadMemory checked the entry interval
erroneously when dealing with contiguous entries.

* terminal,service,proc/*: adds dump command (gcore equivalent)

Adds the `dump` command that creates a core file from the target process.

Backends will need to implement a new, optional, method `MemoryMap` that
returns a list of mapped memory regions.
Additionally the method `DumpProcessNotes` can be implemented to write out
to the core file notes describing the target process and its threads. If
DumpProcessNotes is not implemented `proc.Dump` will write a description of
the process and its threads in a OS/arch-independent format (that only Delve
understands).

Currently only linux/amd64 implements `DumpProcessNotes`.

Core files are only written in ELF, there is no minidump or macho-o writers.

# Conflicts:
#	pkg/proc/proc_test.go
2021-01-29 13:39:33 -08:00
..
dump_linux_amd64.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
dump_linux_other.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
dump_linux.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
dump_other.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
dump_windows_amd64.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08: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 proc/*: remove proc.Thread.Blocked, refactor memory access (#2206) 2020-11-09 11:28:40 -08: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 proc/*: remove proc.Thread.Blocked, refactor memory access (#2206) 2020-11-09 11:28:40 -08:00
proc_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
proc_freebsd.c *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
proc_freebsd.go proc/*: remove proc.Thread.Blocked, refactor memory access (#2206) 2020-11-09 11:28:40 -08:00
proc_freebsd.h *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
proc_linux.go pkg/prog/native/linux: change handling of ESRCH in trapWaitInternal (#2286) 2021-01-04 08:42:08 -08:00
proc_unix.go *: Add --tty flag for debug / exec 2020-04-10 09:53:13 -07:00
proc_windows.go Don't call suspend on DbgUiRemoteBreakin threads (#2281) 2020-12-28 09:07:50 -08:00
proc.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
ptrace_darwin.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
ptrace_freebsd_amd64.c *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_freebsd_amd64.h *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_freebsd.go proc: use CPUID to determine maximum size of XSAVE area (#2256) 2020-12-14 09:39:01 -08:00
ptrace_linux_64bit.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
ptrace_linux_386.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
ptrace_linux_amd64.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
ptrace_linux.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
register_linux_386.go proc/native: fix linux/386 native backend (#2276) 2020-12-21 10:56:09 -08:00
registers_darwin_amd64.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
registers_freebsd_amd64.go proc: use CPUID to determine maximum size of XSAVE area (#2256) 2020-12-14 09:39:01 -08:00
registers_linux_amd64.go proc: use CPUID to determine maximum size of XSAVE area (#2256) 2020-12-14 09:39:01 -08:00
registers_linux_arm64.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
registers_windows_amd64.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
support_sentinel.go proc/gdbserial: Added support for darwin/arm64 using gdbserver (#2285) 2021-01-04 08:52:04 -08: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 terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08: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 proc/*: remove proc.Thread.Blocked, refactor memory access (#2206) 2020-11-09 11:28:40 -08:00
threads_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
threads_freebsd.go proc/*: remove proc.Thread.Blocked, refactor memory access (#2206) 2020-11-09 11:28:40 -08:00
threads_linux_386.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
threads_linux_amd64.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
threads_linux_arm64.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
threads_linux.go proc/*: remove proc.Thread.Blocked, refactor memory access (#2206) 2020-11-09 11:28:40 -08:00
threads_windows.go Don't call suspend on DbgUiRemoteBreakin threads (#2281) 2020-12-28 09:07:50 -08:00
threads.go proc/*: remove proc.Thread.Blocked, refactor memory access (#2206) 2020-11-09 11:28:40 -08:00
zsyscall_windows.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00