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]

Re: [patch] release handle on object files after program exits


On Wednesday 08 April 2009 23:38:29, Joel Brobecker wrote:
> Looks like generic_mourn_inferior is not necessarily called at
> the end of the execution of the program. Lots of targets actually
> call it at the end of their own mourn_inferior, but it is conceivable
> that some may not.

Hmmmm, all process_stratum targets do, but yes, I can imagine
a target not calling it.  We might have one internally --- remote
targets where a "process exit" is just an event and still leaves
execution in the target.  Oh, and when debugging multi-forks in linux,
and one of the forks exits, we skip the normal mourning tail end.  (Gosh,
how the checkpoints support is in the way for multiprocess...)  Not
that that matters much for Windows though.

> But you do have a point. ?How about the following patch instead?
> Instead of closing all descriptors before calling the mourn_inferior
> routine, it does it after.

Looks fine to me.  Thanks!

-- 
Pedro Alves


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