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

> 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.

I thought about that too. This would work very well with targets
that receive an event (either a breakpoint or a specific notification
like on Windows) immediately when a shared library is loaded or unloaded.
But I wonder if we might have some targets where this is not the case.
It it were the case, the notications would arrive late for these targets.

I looked at all the solib-* files, and the only target where that might
be the case is Tru64 - init_inferior_hook isn't turning on any event or
inserting any shlib breakpoint, and procfs doesn't seem to provide
handling for shlib notifications. Perhaps what we could do is error-out
if the user tries to insert a catchpoint on load/unload events, then.

In any case, looks like there a general agreement to remove the current
code... I will do that after I have submitted the changes I made to
get rid of bp_catch_exec.

-- 
Joel


      reply	other threads:[~2008-10-27 17:07 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
2008-10-27 17:45   ` Joel Brobecker [this message]

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=20081027170634.GA4294@adacore.com \
    --to=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