* qXfer:libraries:read
@ 2008-08-22 13:42 Gabe Black
2008-08-22 14:14 ` qXfer:libraries:read Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Gabe Black @ 2008-08-22 13:42 UTC (permalink / raw)
To: gdb
My target has support for the qXfer:libraries:read packet and reports
it in the qSupported packet. However gdb never uses it (i.e. info
share) except for the HEAD version of gdb compiled with mingw. On
linux it doesn't send the packet but it will send the Z-packet. Mingw
will send the qXfer:libraries:read packet but it won't send the
Z-packet. I have expat installed on both the linux systems and mingw
since I see in the documentation gdb requires it to use the
qXfer:libraries:read packet.
Ideally, it would be nice if both supported both. Is there a
changelist for fixing the Z-packet on i386? Maybe I could figure out
how to integrate that fix in to mingw. Or if you know what I need to
do to get the qXfer:libraries:read packet to work that would be great!
Thanks,
Gabe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: qXfer:libraries:read
2008-08-22 13:42 qXfer:libraries:read Gabe Black
@ 2008-08-22 14:14 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-08-22 14:14 UTC (permalink / raw)
To: gabe; +Cc: gdb
On Thu, Aug 21, 2008 at 04:24:17PM -0500, Gabe Black wrote:
> My target has support for the qXfer:libraries:read packet and reports
> it in the qSupported packet. However gdb never uses it (i.e. info
> share) except for the HEAD version of gdb compiled with mingw. On
> linux it doesn't send the packet but it will send the Z-packet. Mingw
> will send the qXfer:libraries:read packet but it won't send the
> Z-packet. I have expat installed on both the linux systems and mingw
> since I see in the documentation gdb requires it to use the
> qXfer:libraries:read packet.
It sounds like your target is neither mingw nor Linux. You need to
teach GDB a certain amount about a target system; for instance, unless
the current target architecture says "I use a list of target-reported
libraries", GDB won't ask for one. You'll need your own tdep file;
they're pretty simple to write, since you can crib off of existing
ones.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* qXfer:libraries:read
@ 2008-04-04 11:25 gdb
2008-04-04 12:31 ` qXfer:libraries:read Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: gdb @ 2008-04-04 11:25 UTC (permalink / raw)
To: gdb
Hi,
I'm using GDB 6.8.5.20080320 (because it has bug fixes that I need), to debug using the remote protocol.
I have written a version of gdbserver for my remote target (ELF on x86), which supports the qXfer:libraries:read packet.
GDB is compiled with target=i686-linux-elf.
GDB reports that support for the packet is switched on:
(gdb)
show remote library-info-packet
341-interpreter-exec console "show remote library-info-packet"
Support for the `qXfer:libraries:read' packet is currently enabled.
After the process being debugged loads a library, the target reports a stop event:
$T05thread:00000f10;library:XXX;#cf
However, GDB never asks for the list of loaded libraries.
Should this work, or does the cygwin port of GDB not support this feature?
If the latter, would it be possible for someone to point me at the part of the source I need to update to get it
working?
Cheers,
Simon.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: qXfer:libraries:read
2008-04-04 11:25 qXfer:libraries:read gdb
@ 2008-04-04 12:31 ` Pedro Alves
0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2008-04-04 12:31 UTC (permalink / raw)
To: gdb; +Cc: gdb
A Friday 04 April 2008 10:34:50, gdb@semi-evolved.org wrote:
> Hi,
>
> I'm using GDB 6.8.5.20080320 (because it has bug fixes that I need), to
> debug using the remote protocol.
>
> I have written a version of gdbserver for my remote target (ELF on x86),
> which supports the qXfer:libraries:read packet. GDB is compiled with
> target=i686-linux-elf.
>
> GDB reports that support for the packet is switched on:
>
> (gdb)
> show remote library-info-packet
> 341-interpreter-exec console "show remote library-info-packet"
> Support for the `qXfer:libraries:read' packet is currently enabled.
> After the process being debugged loads a library, the target reports a stop
> event:
>
> $T05thread:00000f10;library:XXX;#cf
>
> However, GDB never asks for the list of loaded libraries.
>
> Should this work, or does the cygwin port of GDB not support this feature?
>
> If the latter, would it be possible for someone to point me at the part of
> the source I need to update to get it working?
>
A gdb build as --target=i686-linux-elf doesn't know how to fetch the
shared libs using qXfer:libraries:read.
You're talking about gdbserver, so I take it you have a full blown OS,
so probably you're going to need to add smarts to gdb sooner or later.
So, on the GDB side, you'll need to add basic support for your
target. Make sure your target configuration links in solib-target.c, and
that its -tdep.c file registers solib_target_so_ops as solib_ops handler.
You may want to look at i368-cygwin-tdep.c for an example. Minimally,
you'd add the triplet of your OS in the relevant configure.* and
config.* files so you can build with e.g: --target=i386-unknown-myosname.
In gdb/ you'd add a i386-myosname-tdep.c, and in it, you'd
add an i386_myosname_osabi_sniffer, an i386_my_osname_init_abi
and an _initialize_i386_myosname_tdep routines.
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-21 21:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-22 13:42 qXfer:libraries:read Gabe Black
2008-08-22 14:14 ` qXfer:libraries:read Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2008-04-04 11:25 qXfer:libraries:read gdb
2008-04-04 12:31 ` qXfer:libraries:read Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox