2007-09-21 Mike Frysinger * server.c (main): Check status after start_inferior. Index: server.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/server.c,v retrieving revision 1.56 diff -u -p -r1.56 server.c --- server.c 23 Aug 2007 18:08:48 -0000 1.56 +++ server.c 22 Sep 2007 02:30:10 -0000 @@ -900,9 +900,14 @@ main (int argc, char *argv[]) /* Wait till we are at first instruction in program. */ signal = start_inferior (&argv[2], &status); + if (status == 'W' || status == 'X') + { + fprintf (stderr, "Aborting server; child exited with %i\n", signal); + exit (signal); + } + /* We are now (hopefully) stopped at the first instruction of - the target process. This assumes that the target process was - successfully created. */ + the target process. */ /* Don't report shared library events on the initial connection, even if some libraries are preloaded. */