Here is the V3, to address two comments to V2.
- Give a yes-or-no query when read-only address is modified and
trust-readonly-sections is on. See patch 1/7. A test case
gdb.base/trust-readonly.exp is added too.
- Enable trust-readonly-sections on all linux and windows targets
for remote debugging only. It is different from what I proposed,
{x86, x86_64}-{linux,mingw,cygwin}, because it looks odd to enable
this feature only on x86*-linux targets and disable it on the rest of
linux targets. See patch 4/7.
Patch 2/7, 3/7, 6/7 and 7/7 are unchanged. Since the condition on
trusting readonly-sections is restricted (only on remote debugging),
so the doc (patch 5/7) is updated as well.