[Bug breakpoints/34381] Emit an error message when CONFIG_PROC_MEM_NO_FORCE=y causes attach failure

tromey at sourceware dot org via Gdb-prs <[email protected]>
Newsgroups gmane.comp.gdb.bugs.discuss
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34381

--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Adrian Ratiu from comment #6)
> @Tom
> 
> Yes, now that you mention it, after reading that file, I remember one of the
> missing pieces in GDB was that gdbserver has no ptrace fallback. 

We're bitten yet again by the gdb/gdbserver split :(

> However falling back to ptrace is very inefficient: there are more modern
> kernel interfaces which could be used, like process_vm_readv() and
> process_vm_writev().

The aforementioned comment explains why gdb does not use these, namely:

- /proc/PID/mem does not suffer from a race that could cause us to
  access memory of the wrong address space when the inferior execs.

  process_vm_readv/process_vm_writev have this problem.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.