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: [RFA] windows: do not crash if inferior


On Jan 21, 2010, at 6:56 PM, Christopher Faylor wrote:

> On Wed, Jan 20, 2010 at 07:12:12PM +0000, Pedro Alves wrote:
>> On Wednesday 20 January 2010 17:37:46, Christopher Faylor wrote:
>> 
>>> Actually, how about something like this instead?  I used the same wording as fork-child.c
>>> after seeing Pedro's note.
>> 
>>> +      if (!windows_initialization_done)
>>> +	error (_("During startup program exited with code 0x%x."), (unsigned int) current_event.u.ExitProcess.dwExitCode);
>> 
>> I think you should call target_mourn_inferior before
>> throwing, to unpush the target_ops, clear inferior_ptid
>> and delete any thread the OS had already reported, and
>> maybe other things.  You'll also want to call
>> target_terminal_ours.
> 
> Yes, that should have been obvious to me since I was trying to duplicate
> fork-child.c and it does exactly what you suggested.  So the new patch
> is below.
> 
> I don't have an easy way to test this.  Can the OP confirm/deny that this
> works as intended?

Yes, this works as intended.

Tristan.


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