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: RFC: fix crash when inferior exits during "continue"


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Tom> This makes sense to me if the user entered a background command.
Tom> But why not switch if the last command was a foreground command?

Pedro> Yes, agreed.  The lame reason is that the original non-stop work didn't
Pedro> care that much about the CLI (and there's no foreground in MI), and I
Pedro> have an old TODO item for that, that I never got around to.  :-P

I'll file a bug.

>> +#include <stdio.h>

Pedro> Doesn't look necessary.

Oops, I missed this comment before check-in.
I'll fix it now.

>> static void
>> @@ -1095,6 +1096,8 @@ do_restore_current_thread_cleanup (void *arg)
>> set_current_inferior (find_inferior_id (old->inf_id));
>> }
>> 
>> +  current_inferior ()->removable = old->was_removable;

Pedro> This is unnecessary.  restore_current_thread_cleanup_dtor
Pedro> is called when either you run or discard the cleanup.

I did manage to make this change before committing.

Tom


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