Re: [patch] python prompt additions at first prompt.

Tom Tromey
2011-08-03T18:08:05Z

>>>>> "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