diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index fe31f73175..1c1bb5eba0 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2015-08-06 Pedro Alves + + * server.c (captured_main): On error, print the exception message + to stderr, and if run_once is set, throw a quit. + 2015-08-06 Pedro Alves * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index f15b7bedef..d3cc0f8487 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -3610,11 +3610,17 @@ captured_main (int argc, char *argv[]) } CATCH (exception, RETURN_MASK_ERROR) { + fflush (stdout); + fprintf (stderr, "gdbserver: %s\n", exception.message); + if (response_needed) { write_enn (own_buf); putpkt (own_buf); } + + if (run_once) + throw_quit ("Quit"); } END_CATCH }