From: Florian Weimer <fweimer@redhat.com>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>
Cc: Pedro Alves <palves@redhat.com>,
Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>,
gdb-patches@sourceware.org
Subject: Re: [PATCH v3] nptl_db: Support different libpthread/ld.so load orders (bug 27744)
Date: Thu, 22 Apr 2021 17:39:05 +0200 [thread overview]
Message-ID: <87a6pqgwh2.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20210422153008.GM9028@arm.com> (Szabolcs Nagy's message of "Thu, 22 Apr 2021 16:30:10 +0100")
* Szabolcs Nagy:
>> Would you please check if the issue goes away if you replace
>>
>> "add-symbol-file %1$s/nptl/tst-pthread-gdb-attach\n"
>>
>> with
>> "file %1$s/nptl/tst-pthread-gdb-attach\n"
>>
>> ?
>>
>> (I assume this happens without --enable-hardcoded-path-in-tests.)
>
> yes, it seems gdb does not work with
>
> ld.so ./exe
>
> if exe is pie. i could not get it to work wit file either.
>
> add-symbol-file fails even without ld.so, just pie exe fails.
But “file” works?
> you have to use -o offset argument to add-symbol-file and
> manually fish out the base offset from info proc map, i don't
> think that can be easily scripted.
Oh, it's essentially a self-attach (after fork), so we can just read the
base address from the running process. If there's an easy way to do
that. In theory, it's just looking at a symbol at the main program and
subtracting its virtual offset, but I don't know how to get that.
Thanks,
Florian
next prev parent reply other threads:[~2021-04-22 15:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 10:40 Florian Weimer
2021-04-21 11:47 ` Florian Weimer
2021-04-21 22:35 ` H.J. Lu
2021-04-22 9:29 ` Florian Weimer
2021-04-22 7:28 ` Szabolcs Nagy
2021-04-22 8:33 ` Florian Weimer
2021-04-22 9:05 ` Szabolcs Nagy
2021-04-22 9:48 ` Szabolcs Nagy
2021-04-22 11:55 ` Florian Weimer
2021-04-22 12:44 ` Szabolcs Nagy
2021-04-22 14:20 ` Szabolcs Nagy
2021-04-22 14:25 ` Florian Weimer
2021-04-22 15:30 ` Szabolcs Nagy
2021-04-22 15:39 ` Florian Weimer [this message]
2021-04-22 17:22 ` H.J. Lu
2021-04-22 17:56 ` Florian Weimer
2021-04-22 18:27 ` H.J. Lu
2021-04-22 14:34 ` H.J. Lu
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=87a6pqgwh2.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=libc-alpha@sourceware.org \
--cc=palves@redhat.com \
--cc=szabolcs.nagy@arm.com \
/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).