[PATCH] gdb: attach to a process when the executable has been deleted
Andrew Burgess
aburgess@redhat.com
Fri Feb 2 15:46:21 GMT 2024
Tom Tromey <tom@tromey.com> writes:
>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>
> Andrew> Bug PR gdb/28313 describes attaching to a process when the executable
> Andrew> has been deleted. The bug is for S390 and describes how a user sees a
> Andrew> message 'PC not saved'.
> ...
> Andrew> I propose that we add an `access` call to linux_proc_pid_to_exec_file
> Andrew> to check that the target file exists and can be read. If the target
> Andrew> can't be read then we should fall back to /proc/PID/exe (assuming that
> Andrew> /proc/PID/exe can be read).
>
> Thank you. This makes sense to me.
> Approved-By: Tom Tromey <tom@tromey.com>
Pushed.
Thanks,
Andrew
More information about the Gdb-patches
mailing list