On Mon, Oct 17, 2022 at 9:39 PM Asaf Fisher via Gdb-patches < gdb-patches@sourceware.org> wrote: > Introduced `check_proc_self_file` that checks if a path used by > inferior in dlopen is in the form of `/proc/self/...` and if so resolves > it to `/proc/[pid]/...` > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29586 > --- > gdb/solib-svr4.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 56 insertions(+), 2 deletions(-) > > diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c > index 7e83819a03d..231a4fb40e5 100644 > --- a/gdb/solib-svr4.c > +++ b/gdb/solib-svr4.c > @@ -34,6 +34,7 @@ > #include "regcache.h" > #include "gdbthread.h" > #include "observable.h" > +#include "gdbsupport/pathstuff.h" > > #include "solist.h" > #include "solib.h" > @@ -46,6 +47,9 @@ > #include "gdb_bfd.h" > #include "probe.h" > > Looks correct to me. I can confirm gdb.base/solib-proc-self.exp test added > by [PATCH 1/2] fails and hangs without this fix and passes after applying it. This patch needs rebase.