public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
To: Asaf Fisher <asaffisher.dev@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Make GDB resolve dlopen of memory mapped shared libraries
Date: Fri, 21 Oct 2022 12:50:21 +0200	[thread overview]
Message-ID: <CAJVr-EPEPuDfHDYDx70rtOooxiBF97KvBzaDqg+uK01-NjcSSg@mail.gmail.com> (raw)
In-Reply-To: <20221017193858.3006-3-asaffisher.dev@gmail.com>

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.

WARNING: multiple messages have this Message-ID
From: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
To: Asaf Fisher <asaffisher.dev@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Make GDB resolve dlopen of memory mapped shared libraries
Date: Fri, 21 Oct 2022 12:50:21 +0200	[thread overview]
Message-ID: <CAJVr-EPEPuDfHDYDx70rtOooxiBF97KvBzaDqg+uK01-NjcSSg@mail.gmail.com> (raw)
Message-ID: <20221021105021.YCbhFwYbT8Kk-ptOuZEzl3K0GGZSH-uiQ9C6xdxi9Mo@z> (raw)
In-Reply-To: <20221017193858.3006-3-asaffisher.dev@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

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.

  reply	other threads:[~2022-10-21 10:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 19:38 [PATCH 0/2][PR < shlibs/29586>] GDB hangs when trying to resolve memory mapped shared libraries of an inferior under /proc/self/fd/* Asaf Fisher
2022-10-17 19:38 ` [PATCH 1/2] Add test to check GDB handles dlopen of /proc/self/fd/[num] correctly Asaf Fisher
2022-10-17 19:38 ` [PATCH 2/2] Make GDB resolve dlopen of memory mapped shared libraries Asaf Fisher
2022-10-21 10:50   ` Alexandra Petlanova Hajkova [this message]
2022-10-21 10:50     ` Alexandra Petlanova Hajkova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJVr-EPEPuDfHDYDx70rtOooxiBF97KvBzaDqg+uK01-NjcSSg@mail.gmail.com \
    --to=ahajkova@redhat.com \
    --cc=asaffisher.dev@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).