Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com, Nick Roberts <nickrob@snap.net.nz>
Subject: Re: MI solib notification
Date: Sun, 01 Feb 2009 18:04:00 -0000	[thread overview]
Message-ID: <20090201180423.GC4597@caradoc.them.org> (raw)
In-Reply-To: <200901310010.46738.vladimir@codesourcery.com>

On Sat, Jan 31, 2009 at 12:10:46AM +0300, Vladimir Prus wrote:
> +static void mi_solib_loaded (struct so_list *solib)
> +{
> +  struct mi_interp *mi = top_level_interpreter_data ();
> +  target_terminal_ours ();
> +  fprintf_unfiltered (mi->event_channel, 
> +		      "library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",low-address=\"0x%s\",high-address=\"0x%s\",symbols-loaded=\"%d\"", 
> +		      solib->so_original_name, solib->so_original_name, 
> +		      solib->so_name, 
> +		      paddr (solib->addr_low), paddr (solib->addr_high), 
> +		      solib->symbols_loaded);
> +  gdb_flush (mi->event_channel);
> +}

Do existing clients use addr_low / addr_high from "info shared"?
If so, do you know what they use it for?

These fields make sense for SVR4 models, like Linux and BSD shared
libraries, where shared libraries get a single chunk of address space.
But they don't make sense for some DLL systems which load the text and
data separately, or for kernel modules where each section can get a
different load offset.  We should either report the boundaries of
the first contiguous piece, which will not cover the whole library,
or else the highest and lowest address, which may cover bits of
some other library.

> diff --git a/gdb/solib.c b/gdb/solib.c
> index cce4f7f..5a28292 100644
> --- a/gdb/solib.c
> +++ b/gdb/solib.c
> @@ -908,6 +908,7 @@ clear_solib (void)
>      {
>        struct so_list *so = so_list_head;
>        so_list_head = so->next;
> +      observer_notify_solib_unloaded (so);
>        if (so->abfd)
>  	remove_target_sections (so->abfd);
>        free_so (so);

What sort of effect does this have on the existing hooks?  There are
two users of this observer; the bsd-uthread.c one looks like it will
be fine, but this might make
breakpoint.c:disable_breakpoints_in_unloaded_shlib very chatty when
you rerun the program.

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2009-02-01 18:04 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-30 23:44 Vladimir Prus
     [not found] ` <utz7gzcmo.fsf@gnu.org>
2009-02-01 17:53   ` Daniel Jacobowitz
2009-02-01 18:22     ` Eli Zaretskii
2009-02-01 18:29       ` Daniel Jacobowitz
2009-02-17 19:09         ` Vladimir Prus
2009-02-17 19:45           ` Eli Zaretskii
2009-02-17 19:49             ` Vladimir Prus
2009-02-17 20:30               ` Eli Zaretskii
2009-02-17 21:45                 ` Vladimir Prus
2009-02-17 21:59                   ` Vladimir Prus
2009-02-18  7:31                     ` Eli Zaretskii
2009-02-18 10:19                       ` Vladimir Prus
2009-02-18 19:53                         ` Eli Zaretskii
2009-02-18 20:04                           ` Vladimir Prus
2009-02-18 22:28                             ` Eli Zaretskii
2009-02-18  4:24                   ` Eli Zaretskii
2009-02-17 21:37               ` Daniel Jacobowitz
2009-02-17 22:10               ` Pedro Alves
2009-02-18  2:01                 ` Pedro Alves
2009-02-01 18:04 ` Daniel Jacobowitz [this message]
2009-02-12  9:12   ` Vladimir Prus
2009-02-12 13:22     ` Daniel Jacobowitz
2009-02-12 15:02       ` Vladimir Prus
2009-02-12 15:13         ` Daniel Jacobowitz
2009-02-12 17:35           ` Tom Tromey
2009-02-12 18:02             ` Daniel Jacobowitz
2009-02-12 20:11               ` Tom Tromey
2009-02-12 20:17                 ` Vladimir Prus
2009-02-12 20:26                   ` Daniel Jacobowitz
2009-02-17 19:08                     ` Vladimir Prus
2009-02-12 18:06           ` Pedro Alves
2009-02-12 19:45             ` Pedro Alves
2009-02-12 19:56             ` Tom Tromey
2009-02-12 19:58               ` Daniel Jacobowitz
2009-02-13  2:22               ` Joel Brobecker
2009-02-01 18:47 ` 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=20090201180423.GC4597@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=nickrob@snap.net.nz \
    --cc=vladimir@codesourcery.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