Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: gdb@semi-evolved.org
Subject: Re: qXfer:libraries:read
Date: Fri, 04 Apr 2008 12:31:00 -0000	[thread overview]
Message-ID: <200804041238.54832.pedro@codesourcery.com> (raw)
In-Reply-To: <004701c89637$228665a0$679330e0$@org>

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


  reply	other threads:[~2008-04-04 11:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 11:25 qXfer:libraries:read gdb
2008-04-04 12:31 ` Pedro Alves [this message]
2008-08-22 13:42 qXfer:libraries:read Gabe Black
2008-08-22 14:14 ` qXfer:libraries:read Daniel Jacobowitz

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=200804041238.54832.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb@semi-evolved.org \
    --cc=gdb@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