Hello, One of our Windows users reported that he was not able to delete the exe file even after the program was run to completion. As it turns out, we did fix something similar a while ago but only when the program was kill-ed. The attached patch fixes the problem in the case when the program is let to run to completion. 2009-04-03 Joel Brobecker * target.c (target_mourn_inferior): Call bfd_cache_close_all. Tested on x86_64-linux. Also tested on x86-windows using AdaCore's testsuite. I will write a testcase for this one. I have to run now, but I wanted to put this patch out, in case someone has some comments about it. Will commit in a few days if no objection. One thing that crossed my mind while working on this is wondering whether it would make sense for target_kill to call target_mourn_inferior at the end. Right now, it looks like a lot (most? all?) implementations of the target_kill method call target_mourn_inferior... -- Joel