Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sources.redhat.com, kevinb@redhat.com, eliz@gnu.org
Subject: Re: [RFA] Introduce solib_loaded observer
Date: Sun, 09 Jan 2005 00:01:00 -0000	[thread overview]
Message-ID: <20050109000104.GA1853@nevyn.them.org> (raw)
In-Reply-To: <200501082314.j08NE6a1080151@elgar.sibelius.xs4all.nl>

On Sun, Jan 09, 2005 at 12:14:06AM +0100, Mark Kettenis wrote:
> This patch introduces a new solib_loaded observer that parallels the
> solub_unloaded observer that we already have.  I need this observer to
> properly implement a threads stratum for FreeBSD and OpenBSD
> user-space threads library support.  With this observer I'll also be
> able to fix the problems we're having with statically linked programs
> that use the threading library on Linux.  If you think about it a bit,
> the problems with static thread libraries stem from the fact that we
> abuse the now deprecated target_new_objfile_hook to get notified about
> newly loaded libraries.  Unfortunately that hook is also called when
> the main executable is loaded, which causes all kinds of trouble.

Actually, I've already posted patches for the Linux problem.  The basic
"abuse" of the target_new_objfile_hook isn't really the stumbling
block, rather, the attempt to use it for both running and non-running
programs.  The necessary fix was to use inferior_created.  Still, it'll
definitely be cleaner to use a solib_loaded hook there, and I look
forward to that.

I'll ping that patch after I get back from travelling next week.

> The patch below doesn't only implement the new observer.  The reason
> for that is that when the solib_loaded observer is called, the symbols
> for the new library haven't been loaded yet.  So I've split out the
> code to read in those symbols out from solib_add() into a seperate
> function, and made that public.

Could you explain why this is necessary, instead of calling the
observer after loading symbols?  I don't see notification at that point
as particularly useful.  Certainly the first thing the GNU/Linux code
would want to do would be to load the symbols.

-- 
Daniel Jacobowitz


  reply	other threads:[~2005-01-09  0:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-08 23:14 Mark Kettenis
2005-01-09  0:01 ` Daniel Jacobowitz [this message]
2005-01-09 13:05   ` Mark Kettenis
2005-01-09 22:37     ` Daniel Jacobowitz
2005-01-09 22:58       ` Mark Kettenis
2005-01-09 23:06         ` Daniel Jacobowitz
2005-01-11 21:57           ` Mark Kettenis
2005-01-12  1:09             ` Daniel Jacobowitz
2005-01-11 21:15         ` Kevin Buettner
2005-01-09  4:40 ` Eli Zaretskii
2005-01-09 11:01   ` Mark Kettenis
2005-01-12 20:49   ` Mark Kettenis
2005-01-13  4:38     ` Eli Zaretskii
2005-01-10 16:21 ` Andrew Cagney

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=20050109000104.GA1853@nevyn.them.org \
    --to=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@redhat.com \
    --cc=mark.kettenis@xs4all.nl \
    /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