gdb/linux-nat: Check whether /proc/pid/mem is writable
authorPedro Alves <pedro@palves.net>
Thu, 21 Jul 2022 18:11:16 +0000 (19:11 +0100)
committerPedro Alves <pedro@palves.net>
Tue, 26 Jul 2022 18:25:30 +0000 (19:25 +0100)
commit1bcb0708f22956d5128a2e75df6eba5a18327892
tree3b41c83c81cf4baf68c846fb030dd97e81b1a2b1
parentecbff28a4457d0ebe11023fa9671d62251e7463d
gdb/linux-nat: Check whether /proc/pid/mem is writable

Probe whether /proc/pid/mem is writable, by using it to write to a GDB
variable.  This will be used in the following patch to avoid falling
back to writing to inferior memory with ptrace if /proc/pid/mem _is_
writable.

Change-Id: If87eff0b46cbe5e32a583e2977a9e17d29d0ed3e
gdb/linux-nat.c