Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
Date: Mon, 09 Dec 2013 11:33:00 -0000	[thread overview]
Message-ID: <20131209113333.GC4011@adacore.com> (raw)
In-Reply-To: <52A073CC.3050009@redhat.com>

> :-)  I'd be good to have this new info distilled as a comment
> in the code, IMO.

Excellent suggestion, of course. I, with my incessant asking for
comments, should have thought of it too! ;-)

[regarding gdbserver]
> I think the fix is very low risk, and could go in with minimal
> testing.

OK - will work on that ASAP.

> > In the meantime, does the GDB-side fix look OK to commit to you
> > (modulo the small issue you raised)?
> 
> Yes.
> 
> One nit -- does ntdll.dll appears at the end of the
> loaded list with this fix, or at the beginning?  I'd think
> it should be the first dll in "info sharedlibrary", assuming
> that that's what we see on older Windows versions.

I think this is going to be difficult, unless we defer the notification
for the other shared libraries - in which case we're doing what I wanted
to do, but after 7.7 gets cut, which is to ignore LOAD_DLL_DEBUG_EVENTs
until the end of do_initial_windows_stuff, and then just iterate over
all modules to generate the SOs.

The reason why I think it would be difficult is because, when a new
shared object is loaded, we get a TARGET_WAITKIND_LOADED, which
I think eventually leads us to:

  -> handle_solib_event ()
     -> solib_add (NULL, 0, &current_target, auto_solib_add);
        -> update_solib_list (from_tty, target);

And looking at update_solib_list, it calls current_sos, and then
adds new SOs at the end (via the VEC_push). On top of that, an
easier issue that we'll have to handle in windows-nat the adding
of the new SO at the start of the SO list, rather than then end.

Since this is mostly cosmetic and only affects Windows 2012,
I would leave it alone until we have more leeway towards simplifying
the DLL handling.

-- 
Joel


  reply	other threads:[~2013-12-09 11:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 11:31 Joel Brobecker
2013-12-03 19:51 ` Pedro Alves
2013-12-03 20:11   ` Eli Zaretskii
2013-12-05 10:54   ` Joel Brobecker
2013-12-05 12:38     ` Pedro Alves
2013-12-09 11:33       ` Joel Brobecker [this message]
2013-12-09 17:08         ` Pedro Alves
2013-12-10 10:06           ` pushed: " Joel Brobecker
2013-12-10 10:06             ` Joel Brobecker
2013-12-10 10:56         ` Joel Brobecker
2013-12-10 13:41           ` Pedro Alves
2013-12-10 13:58             ` Pedro Alves
2013-12-12 18:18               ` Joel Brobecker
2013-12-12 18:51                 ` Eli Zaretskii
2013-12-12 19:08                 ` Pedro Alves
2013-12-12 22:06                 ` Tom Tromey
2013-12-13 10:06                   ` Pedro Alves
2013-12-13 11:04                     ` Joel Brobecker
2013-12-13 11:21                       ` Pedro Alves
2013-12-13 19:38                     ` Tom Tromey
2013-12-13 14:17                 ` Joel Brobecker
2013-12-13 14:42                   ` Pedro Alves
2013-12-13 15: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=20131209113333.GC4011@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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