This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Do not break while asking with -batch


Hi,

there was PR 9591 which originated from a request to safely `gdb_gcore.sh'
even from a very small terminal window.

FSF GDB HEAD currently still asks in such window
	---Type <return> to continue, or q <return> to quit---
and aborts.

OK to check-in?

No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.


Thanks,
Jan


gdb/
2010-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* utils.c (prompt_for_continue): Return on BATCH_FLAG or not
	INPUT_FROM_TERMINAL_P.

--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2155,6 +2155,9 @@ prompt_for_continue (void)
   char *ignore;
   char cont_prompt[120];
 
+  if (batch_flag || ! input_from_terminal_p ())
+    return;
+
   if (annotation_level > 1)
     printf_unfiltered (("\n\032\032pre-prompt-for-continue\n"));
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]