delve/service/debugger
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
..
debugger_darwin.go Add support for Windows. 2016-01-20 19:06:31 -08:00
debugger_freebsd.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
debugger_linux.go debugger: make yama error more verbose 2018-08-20 10:37:04 -07:00
debugger_test.go *: Better error launching invalid binary format 2020-04-02 18:41:16 +02:00
debugger_unix_test.go service/debugger: Fix checking for CI 2020-04-14 21:02:38 +02:00
debugger_unix.go *: Better error launching invalid binary format 2020-04-02 18:41:16 +02:00
debugger_windows.go *: Better error launching invalid binary format 2020-04-02 18:41:16 +02:00
debugger.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00