Reputation: 349
I'm trying to dump the memory of a process on a remote machine. The target machine is some kind of an old Linux, and I'm running gdbserver 8.3
on it that I've compiled.
I'm able to create some handy dumps using gcore
command, however, these dumps are missing all of the r-x
and r--
sections, it contains only writable sections. Can anyone guide me on how to generate a full memory dump including everything, preferably in the same core dump format?
I've already tried both
set use-coredump-filter on
set use-coredump-filter off
and
set dump-excluded-mappings on
set dump-excluded-mappings off
Upvotes: 4
Views: 2175
Reputation: 78
You should set the core file filter in /proc/PID/coredump_filter
per http://man7.org/linux/man-pages/man5/core.5.html.
E.g.
echo 0xff > /proc/$(pidof foo)/coredump_filter
gcore $(pidof foo)
Upvotes: 3