- struct dll_info *dll;
- struct dll_info key_dll;
-
- /* Be careful not to put the key DLL in any list. */
- key_dll.name = (char *) name;
- key_dll.base_addr = base_addr;
-
- dll = (void *) find_inferior (&all_dlls, match_dll, &key_dll);
-
- if (dll == NULL)
- /* For some inferiors we might get unloaded_dll events without having
- a corresponding loaded_dll. In that case, the dll cannot be found
- in ALL_DLL, and there is nothing further for us to do.
-
- This has been observed when running 32bit executables on Windows64
- (i.e. through WOW64, the interface between the 32bits and 64bits
- worlds). In that case, the inferior always does some strange
- unloading of unnamed dll. */
- return;
- else
- {
- /* DLL has been found so remove the entry and free associated
- resources. */
- remove_inferior (&all_dlls, &dll->entry);
- free_one_dll (&dll->entry);
- dlls_changed = 1;
- }