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] python prompt additions at first prompt.


>>>>> "Matt" == Matt Rice <ratmice@gmail.com> writes:

Matt> I think it's ok anyways, the 'if (async_command_editing_p)' case in
Matt> display_gdb_prompt seems to cover it,
Matt> with the addition of rl_callback_handler_remove() which afaict seemed
Matt> ok to call before a handler is installed

It is really unclear to me whether or not this patch is ok.

display_gdb_prompt can early exit in a couple of cases:

1:

  if (!current_interp_display_prompt_p ())
    return;

(I don't think this one can happen here.)

2:

  if (sync_execution && is_running (inferior_ptid))
    {
[...]
      rl_callback_handler_remove ();
      return;

This seems like it could be possible, maybe with attach + cont from the
command line?

If that one cannot be taken, then I agree the patch is correct.
Could you try this?

Tom


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