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: lazily call save_current_space_and_thread


Tom> "run" appears to work in the background, which is mysterious to me.

Pedro> Hmm.  It shouldn't.  Well, behind the scenes it does run
Pedro> asynchronously, but only "run&" should work in the background,
Pedro> from the user's perpective.

Pedro> Boo, something's seriously broken :-/ :

I looked into this.

What happens is that fetch_inferior_event calls normal_stop whenever a
subprocess exits.  E.g., I see this:

Starting program: /usr/bin/make clean
[...]
[New process 13249]
[...]
[Inferior 2 (process 13249) exited normally]

... at which point I get the (gdb) prompt.

The initial `make' process and the other things it invokes continue
running.  I thought this was due to non-stop, but disabling that didn't
seem to change anything.


What I expected to happen is that after my `run', I should not get a
prompt back until either (1) some event occurs (breakpoint, SEGV,
whatever), or (2) the inferior and all its subprocesses have exited.

This would require some extra logic when handling exit events, since
AFAICT there is nothing to support this in there right now.

I would appreciate your comments on this.


Once I stop the inferiors, it is hard to restart them nicely.  I guess
this is where the I/T set idea comes in -- you need a way to be able to
say "continue all inferiors".

Tom


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