This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Windows] DLL load/unload events during inferior startup cleanup


Hello,

This patch series implements something that we talked about last December,
which we couldn't do then because considered too risky prior to cutting
the gdb-7.7 branch.

  Subject: [RFA] nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
  https://www.sourceware.org/ml/gdb-patches/2013-12/msg00073.html

Quick summary:

  On Windows 2012, the LOAD_DLL_DEBUG_EVENT corresponding to the first
  DLL being mapped, which is ntdll.dll, was happening too early,
  preventing us from being able to add it to our solist. This has
  various consequences, one of them being missing unwind info,
  thus breaking unwinding.

  The fix we applied at the time was to continue as normal during
  the startup phase, and then add some small code in at the of
  that phase to come back and try to locate that DLL so as to add it
  then if we failed to do it earlier.

  But we also remarked that we did not really need to do it this way
  at all. Instead, we should wait for the startup phase to be over,
  and then ask the system about all DLLs, adding them to our solist
  at that point. This involves ignoring load/unload DLL events during
  the startup phase.

This patch series:

  Now that the branch has been cut, this series implements this idea.
  It only applies to GDB at the moment, as I haven't had time to
  look into GDBserver yet. Instead, I've spent the time to test
  this patch on numerous versions of Windows, both 32 and 64 bits,
  with versions going back to XP.

  The meat of the series is in the first patch, with the following two
  being simplifications allowed by the first one.

  I will tackle GDBserver next, but in the meantime, I think this
  patch series should already be useful on its own. If anything,
  I think it's a nice simplification overall, and hey, you even
  get ntdll.dll to show up at the beginning of "info shared" on
  Windows 2012 :-).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]