sorry, think i'm done now... this patch is intended to be functionally equivalent to the one i sent yesterday wrt prompt bugs, I thought (too late), that the sync_execution && !is_running behavior of 'display an empty prompt followed by an actual prompt' is odd, and since it happens only in obscure cases is easily missed. 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. 2011-08-12 Matt Rice * event-top.c (cli_command_loop): Call display_gdb_prompt unconditionally. (display_gdb_prompt): Exit early if sync_execution is set. Move observer calls after early exits. Remove extra semi-colon. (async_enable_stdin): Don't pop an empty prompt. (async_disable_stdin): Don't push an empty prompt. more information on PR 10720, which I'd had random difficulties reproducing, I managed to figure out why, the process being attached to must be on the same tty as the gdb process to reproduce it. Haven't been able to reproduce that in the testsuite though. thus the following gdb command lines on the various PID tty's the buggy gdb process which gets Stopped is frobbed. $ ~/tests/test & [10] 18413 $ tty /dev/pts/0 $ ~/tests/test & [3] 18415 $ tty /dev/pts/4 $ gdb/gdb -quiet -ex 'set target-async on' -ex 'attach 18415' -ex 'continue&' Attaching to process 18415 Continuing. [4]+ Stopped gdb/gdb -quiet -ex 'set target-async on' -ex 'attach 18415' -ex 'continue&' $ gdb/gdb -quiet -ex 'set target-async on' -ex 'attach 18413' -ex 'continue&' Attaching to process 18413 Continuing. Program received signal SIGSTOP, Stopped (signal). 0x00400525 in ?? () Reading symbols from /home/ratmice/tests/test...done. Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib64/libc.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 main (argc=1, argv=0x7fff67d42c68) at test.c:39 39 ; (gdb)