From: Andrew Stubbs Date: Wed, 6 Dec 2006 16:49:57 +0000 (+0000) Subject: 2006-12-06 Andrew Stubbs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa3fd85b0634c30ae1adeeb80e92c03fc1d4f08a;p=binutils-gdb.git 2006-12-06 Andrew Stubbs * event-top.c (command_handler): On EOF, print 'quit' and run quit command via execute_command such that hooks and trace work. * utils.c (defaulted_query): On EOF, print default answer and newline. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc4d21a8c24..436b14cb1d1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2006-12-06 Andrew Stubbs + + * event-top.c (command_handler): On EOF, print 'quit' and run quit + command via execute_command such that hooks and trace work. + * utils.c (defaulted_query): On EOF, print default answer and newline. + 2006-12-06 Vladimir Prus * varobj.c (cplus_value_of_child): When accessing diff --git a/gdb/event-top.c b/gdb/event-top.c index 6e26002dcaa..d7d6d972fda 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -501,7 +501,10 @@ command_handler (char *command) but GDB is still alive. In such a case, we just quit gdb killing the inferior program too. */ if (command == 0) - quit_command ((char *) 0, stdin == instream); + { + printf_unfiltered ("quit\n"); + execute_command ("quit", stdin == instream); + } time_at_cmd_start = get_run_time (); diff --git a/gdb/utils.c b/gdb/utils.c index b33eadd1878..ab8bb4008d5 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1230,6 +1230,7 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args) clearerr (stdin); /* in case of C-d */ if (answer == EOF) /* C-d */ { + printf_filtered ("EOF [assumed %c]\n", def_answer); retval = def_value; break; }