This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix DLL unload events in MinGW GDB
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 20 May 2013 14:53:02 +0400
- Subject: Re: [RFA] Fix DLL unload events in MinGW GDB
- References: <83li7ax1a0 dot fsf at gnu dot org>
> So it looks like the call to solib_add inside handle_unload_dll is the
> culprit. And indeed, the trivial one-liner below is enough to fix
> both stop-on-solib-events and "catch unload" for me.
>
> OK to commit (with ChangeLog)? Branch also?
That looks correct to me. The solib_add call will be done by the
core infrastructure (via infrun's handling of the TARGET_WAITKIND_LOADED
event, calling handle_solib_event).
For the gdb-7.6 branch, you'll need to:
- Create a GDB PR describing the issue being fixed;
- Update the gdb-7.6 release page to add an entry succinctly
describing the fix:
http://sourceware.org/gdb/wiki/GDB_7.6_Release
For the record, I tested this patch on x86-windows using AdaCore's
testsuite, JIC, and found no regression.
>
> --- gdb/windows-nat.c~1 2013-04-27 11:58:26.875375000 +0300
> +++ gdb/windows-nat.c 2013-05-19 21:34:31.500000000 +0300
> @@ -890,7 +890,6 @@ handle_unload_dll (void *dummy)
> DEBUG_EVENTS (("gdb: Unloading dll \"%s\".\n", sodel->so_name));
>
> windows_free_so (sodel);
> - solib_add (NULL, 0, NULL, auto_solib_add);
> return 1;
> }
>
>
--
Joel