On Fri, Aug 12, 2011 at 8:07 AM, Matt Rice wrote: > On Fri, Aug 12, 2011 at 7:44 AM, Pedro Alves wrote: >> On Friday 12 August 2011 14:10:17, Matt Rice wrote: >>> it seems clearer to return early in all sync_execution cases, and >>> limit the potential for introducing the double prompting type of bug. >>> I haven't been able to find any problems with this approach. >> >> I think this breaks the pagination prompt in async mode.  Try setting >> a breakpoint in a loop, with a command list that just continues: >> >> (gdb) b inloop >> (gdb) commands >> Type commands for breakpoint(s) 2, one per line. >> End with a line saying just "end". >>>c >>>end >> (gdb) c > > Yeah it does, thank you for pointing this out. > Here is a version of my previous patch, which doesn't suffer from this failure. I have added comments explaining that we really do want to display an empty prompt in this case. hopefully this clears up any confusion... 2011-08-28 Matt Rice * event-top.c (cli_command_loop): Replace readline setup with direct call to display_gdb_prompt. (display_gdb_prompt): Do not call observer mechanism during synchronous execution. 2011-08-28 Matt Rice * lib/prompt.exp: New file for testing the first prompt. * gdb.python/py-prompt.exp: Ditto. * gdb.python/py-prompt.c: Ditto (copy of ext-attach.c).