Windows: Rely purely on event info when handling DLL load event
When a DLL gets loaded an the debugger gets a debug event about it,
the currently implementation in handle_load_dll currently tries to
fetch the DLL's name by first iterating over all DLLs known to
the system. It should be sufficient to rely on the name provided
with the event, however, especially in the situation we are now,
where we now know that we're past the statup phase for our inferior.
This patch therefore simplifies windows-nat.c::handle_load_dll to
only rely on the event's lpImageName.
It also updates the function's comment to document the assumption
regarding not being during the inferior's startup phase. And while
at it, it fixes the function documentation, which was probably
unintentionally inherited from another function (perhaps windows_wait).
gdb/ChangeLog:
* windows-nat.c (handle_load_dll): Rewrite this function's
introductory comment. Remove code using get_module_name
to get the DLL's name.