2013-11-06 Muhammad Bilal <mbilal@codesourcery.com>
authorMuhammad Bilal <mbilal@codesourcery.com>
Wed, 6 Nov 2013 06:42:52 +0000 (11:42 +0500)
committerMuhammad Bilal <mbilal@codesourcery.com>
Wed, 6 Nov 2013 07:24:23 +0000 (12:24 +0500)
       PR cli/16122
       * top.c (command_line_input): Unify interactivity tests to use
       input_from_terminal_p.
       * event-top.c (command_line_handler): Likewise.

gdb/ChangeLog
gdb/event-top.c
gdb/top.c

index c25213851178d99857ed546ae0a1fadc1b6a058e..e721f029d99ec7affa2e0a87393ac480abe21e5e 100644 (file)
@@ -1,3 +1,10 @@
+2013-11-06  Muhammad Bilal  <mbilal@codesourcery.com>
+
+       PR cli/16122
+       * top.c (command_line_input): Unify interactivity tests to use
+       input_from_terminal_p.
+       * event-top.c (command_line_handler): Likewise.
+
 2013-11-06  Yao Qi  <yao@codesourcery.com>
 
        * Makefile.in (check-perf): New target.
index 1f2e6fb9e7c3c55317f26f7d962e6f7dc1e30922..1290dd098261f304a9cd24bd418745007036933b 100644 (file)
@@ -606,8 +606,7 @@ command_line_handler (char *rl)
   *p = 0;
 
   /* Add line to history if appropriate.  */
-  if (instream == stdin
-      && ISATTY (stdin) && *linebuffer)
+  if (*linebuffer && input_from_terminal_p ())
     add_history (linebuffer);
 
   /* Note: lines consisting solely of comments are added to the command
index c473d8c1bd26da9730c54f6cbe0c5c4299358066..7d928e13be2bb2bbe25640bebbcb843ef0dd7317 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1061,8 +1061,7 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix)
   *p = 0;
 
   /* Add line to history if appropriate.  */
-  if (instream == stdin
-      && ISATTY (stdin) && *linebuffer)
+  if (*linebuffer && input_from_terminal_p ())
     add_history (linebuffer);
 
   /* Note: lines consisting solely of comments are added to the command
This page took 0.048023 seconds and 4 git commands to generate.