From: Pedro Alves <palves@redhat.com>
To: Raphael Zulliger <zulliger@indel.ch>,
GDB Patches <gdb-patches@sourceware.org>
Subject: Re: Ensure correct symbol-file when attaching to a (remote) process
Date: Mon, 14 Jan 2013 18:52:00 -0000 [thread overview]
Message-ID: <50F453C4.4060502@redhat.com> (raw)
In-Reply-To: <50EA78FB.3040609@indel.ch>
(adding back gdb-patches@, which seems to have been
removed from CC by mistake).
On 01/07/2013 07:27 AM, Raphael Zulliger wrote:
> On 01/02/2013 06:56 PM, Pedro Alves wrote:
>> A build id check would really be ideal.
> I agree. (--build-id is a very interesting feature which I was not
> aware of. Thanks for that hint Jan)
>
> In our scenario, our GDB stub could get that build-id from the
> running target: Our embedded systems provides a variable read/write
> mechanism accessible by the stub. Moreover, the embedded system
> could be made aware of the address of the build-id by introducing
> variables around the .note.gnu.build-id section in the linker
> script.
Assuming the enough sticks around in the binary that goes
to the system to have the stub find those variables without
relying on GDB, sounds like something that should work.
>
> Therefore, if the GDB remote serial protocol would offer a way to
> "get" that id from the stub and GDB would offer a feature to
> compare/check that id, it'd perfectly work for us. AFAIK there are
> no "generic" ways of transferring data by the remote serial
> protocol, therefore, we'd need to extend it accordingly, right?
For getting the build-id blob, it sounds pretty much like
something for qXfer:$object:read. You'd just need to define
a new (e.g.) "gnu-build-id" $object (there's some mechanics
involved, but also examples to follow).
> Could such a protocol extension, and the according build-id
> comparison check make it into GDB?
IMO, yes.
For GNU/Linux and other systems, we'd need a build-id per
executable/library/module, so it seems like the build-id
could/should be reported in the existing
qXfer:libraries/qXfer:libraries-svr4 as well.
--
Pedro Alves
next parent reply other threads:[~2013-01-14 18:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50D3FC31.1020103@indel.ch>
[not found] ` <20121221161114.GA32638@host2.jankratochvil.net>
[not found] ` <201212211917.qBLJH6Il028006@new.toad.com>
[not found] ` <50E474E3.7050605@redhat.com>
[not found] ` <50EA78FB.3040609@indel.ch>
2013-01-14 18:52 ` Pedro Alves [this message]
2013-01-14 18:56 ` Pedro Alves
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=50F453C4.4060502@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=zulliger@indel.ch \
/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