[RFC] gdb could leave inferior running as a background process

Doug Evans dje@google.com
Wed Apr 23 02:19:00 GMT 2008


On Tue, Apr 22, 2008 at 1:39 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Apr 22, 2008 at 01:36:01PM -0700, Doug Evans wrote:
>  > It seems like there are multiple places where this can happen.  E.g.
>  > wait_for_inferior -> handle_inferior_event -> find_pc_partial_function
>  > -> target_terminal_ours_for_output.
>
>  But by then it's stopped, right?  As long as something makes sure we
>  give the terminal back after the warning it shouldn't be a problem.

Ah.  It's hard to reason about correctness in this part of gdb.  I can
see that keep_going calls target_terminal_inferior, but the code paths
are embedded in a big hairy state machine.  [I've seen what
wait_for_inferior used to be, things *have* improved though.]



More information about the Gdb-patches mailing list