I was looking through cleaning up mi/ global state, and noticed the global mi_error_message used to output ^error,msg="" messages. I then noticed that the errors output by the mi/ module are also duplicated to stderr. >./gdb -i=mi ~"GNU gdb 6.8.50.20080323-cvs\n" ~"Copyright (C) 2008 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later \n" ~"This is free software: you are free to change and redistribute it.\n" ~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n" ~"and \"show warranty\" for details.\n" ~"This GDB was configured as \"x86_64-unknown-linux-gnu\".\n" ~"Setting up the environment for debugging gdb.\n" &"/home/pedro/gdb/head/build/gdb/.gdbinit:5: Error in sourced command file:\n" &"No symbol table is loaded. Use the \"file\" command.\n" (gdb) -exec-continue ^running (gdb) &"The program is not being run.\n" ^error,msg="The program is not being run." (gdb) Notice the duplication: &"The program is not being run.\n" ^error,msg="The program is not being run." I can't find a valid reason for that. In fact having them display in gdb's output window in a frontend doesn't help anyone, especially, since ^error is supposed to be the error output channel. Furthermore, there are a couple of cases that weren't using the mechanism correctly, as they were already calling error. The attached patch fixes it, and fixes the testsuite to not expect this duplication. -- Pedro Alves