Re: [PATCH v2 4/5] Extend GNU/Linux to check for ptrace error

Kevin Buettner
2020-03-27T17:02:44Z

On Tue, 17 Mar 2020 11:47:18 -0400
Sergio Durigan Junior <sergiodj@redhat.com> wrote:

> + /* The user may be debugging remotely, so we have to warn that
> + the instructions above should be performed in the target. */
> + string_appendf (ret,
> + _("\n\
> +If you are debugging the inferior remotely, the ptrace restriction(s) must\n\
> +be disabled in the target system (e.g., where GDBserver is running)."));

It seems to me that we ought to be able to know if the user is debugging
remotely. If possible, I'd like to see a more targeted message when
debugging remotely. The message can then be suppressed entirely for
native debugging. The new message might look something like this:

You are debugging the inferior remotely, so the ptrace restriction(s)
must be disabled in the target system (i.e. where GDBserver is running).

If that's not feasible for some reason, "e.g." should still be changed
to "i.e.".

Kevin