This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Suggest newer gdbserver if it has no qXfer:exec-file:read
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Gary Benson <gbenson at redhat dot com>
- Date: Tue, 5 Apr 2016 19:14:16 +0200
- Subject: Re: [patch] Suggest newer gdbserver if it has no qXfer:exec-file:read
- Authentication-results: sourceware.org; auth=none
- References: <20160319201842 dot GA16540 at host1 dot jankratochvil dot net> <56F13963 dot 9040204 at redhat dot com> <20160322131604 dot GA24312 at host1 dot jankratochvil dot net> <56F14F1E dot 5010606 at redhat dot com> <20160323211547 dot GA17400 at host1 dot jankratochvil dot net> <5703E885 dot 3090309 at redhat dot com>
On Tue, 05 Apr 2016 18:32:05 +0200, Pedro Alves wrote:
> On 03/23/2016 09:15 PM, Jan Kratochvil wrote:
> > Sending packet: $qXfer:exec-file:read:67:0,fff#f7...Packet received: l/root/redhat/threadit
> > Reading /root/redhat/threadit from remote target...
> > Sending packet: $vFile:open:2f726f6f742f7265646861742f7468726561646974,0,0#7e...Packet received: F5
> > Sending packet: $vFile:pread:5,3fff,0#98...Packet received: F27f8;\177ELF\002\001\001\000
> > Just stating that, nothing interesting.
> That'd assume that there's a structured elf on the target, while on bare
> metal, you don't have that; no sections, no segments, etc. Nothing other
> than unstructured raw memory, much like what the "dump memory" would
> give you.
Yes, reading raw memory without structure is not useful as an exec-file (I see
now gdbserver protocol "qXfer:exec-file:read:" maps to the GDB command "file"
and not to the GDB command "exec-file") which serves mostly as a symbol file.
But for example vDSO is a memory readable ELF file. I remember some other
ROMs which also had structured format, parseable by BFD but not really
containing a filesystem. Amiga ROM contained a list of libraries, each one
with some PLTs etc.