little bug with the new python prompt stuff, the prompt_hook doesn't take effect until the second prompt. I couldn't for the life of me figure out how to do a testcase for this... using gdb.mi/mi-async.exp as an example of using -ex it still didn't want to work, there was also the need to match the very first prompt. and command line python stuff seems to go awry of how skip_python_tests works. sorry. before: gdb/gdb -quiet -ex 'set prompt (foo) ' -ex 'python def prompt(x): return "(bar) "' -ex 'python gdb.prompt_hook = prompt' (foo) (bar) quit ~/git/gdb/gdb/gdb -quiet -ex 'python def prompt(x): return "(bar) "' -ex 'python gdb.prompt_hook = prompt' (gdb) (bar) quit after: gdb/gdb -quiet -ex 'set prompt (foo) ' -ex 'python def prompt(x): return "(bar) "' -ex 'python gdb.prompt_hook = prompt' (bar) (bar) quit gdb/gdb -quiet -ex 'python def prompt(x): return "(bar) "' -ex 'python gdb.prompt_hook = prompt' (bar) (bar) quit ran the above things with --enable-tui --disable-tui plus gdb --interpreter=tui and ran the testsuite with --enable-tui and --disable-tui. didn't see anything but what looked like tests that fail randomly. I think it's ok anyways, the 'if (async_command_editing_p)' case in display_gdb_prompt seems to cover it, with the addition of rl_callback_handler_remove() which afaict seemed ok to call before a handler is installed otherwise, there is a workaround calling gdb.execute("set prompt " + prompt("foo")) Thanks. 2011-07-30 Matt Rice * event-top.c (cli_command_loop): Remove code redundant to display_gdb_prompt. * tui/tui-interp.c (tui_command_loop): Ditto.