Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: catch load/unload not implemented on any target (remove?)
Date: Mon, 27 Oct 2008 15:43:00 -0000	[thread overview]
Message-ID: <20081027141906.GA5009@caradoc.them.org> (raw)
In-Reply-To: <20081027004044.GA3907@adacore.com>

On Sun, Oct 26, 2008 at 05:40:44PM -0700, Joel Brobecker wrote:
> Hello,
> 
> I was looking at converting the catch load/unload implementation
> to using the bp_catchpoint kind. But looking at the implementation,
> I realized there isn't any platform where this feature is implemented.
> The documentation says HP/UX, but this isn't correct either, AFAICT.

It used to be, IIRC.

> I think that the mechanism of using macros is definitely OBE now, and
> one should use "methods" in the target_so_ops structure.

I think it should be even higher level than that.  The core solib
machinery knows how to stop on load/unload (set stop-on-solib-events).
And it knows how to update the list of loaded libraries based on
current_sos.  All that's missing is a 'diff' operation: report which
libraries have been added or removed, so that the common code can
report them sensibly to the user.  I'd love if I could replace "set
stop-on-solib-events 1" with "catch load" and have GDB say "Stopped at
load of libfoo.so.1" or "Stopped at load of 6 libraries".  The latter
is not as important, since (on svr4 targets) it happens only during
program startup, when the dynamic loader initializes.

IOW I don't think we need any new breakpoint that we don't already
have.

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2008-10-27 14:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27  0:41 Joel Brobecker
2008-10-27  4:16 ` Eli Zaretskii
2008-10-27 14:19 ` Aleksandar Ristovski
2008-10-27 13:57   ` Aleksandar Ristovski
2008-10-27 15:43 ` Daniel Jacobowitz [this message]
2008-10-27 17:45   ` Joel Brobecker

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=20081027141906.GA5009@caradoc.them.org \
    --to=drow@false.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@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