Fix warning: Invalid entry in .debug_gdb_scripts section
[deliverable/binutils-gdb.git] / gdb / top.c
index 6bf9d8c02165ee70a002cef37f8c61f4769b2107..295b6806deff22a61a7ae7df7e0f5c3192e28ca0 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1030,8 +1030,11 @@ gdb_readline_wrapper (const char *prompt)
   if (cleanup->target_is_async_orig)
     target_async (0);
 
-  /* Display our prompt and prevent double prompt display.  */
-  display_gdb_prompt (prompt);
+  /* Display our prompt and prevent double prompt display.  Don't pass
+     down a NULL prompt, since that has special meaning for
+     display_gdb_prompt -- it indicates a request to print the primary
+     prompt, while we want a secondary prompt here.  */
+  display_gdb_prompt (prompt != NULL ? prompt : "");
   if (ui->command_editing)
     rl_already_prompted = 1;
 
@@ -1307,6 +1310,9 @@ command_line_input (const char *prompt_arg, int repeat, char *annotation_suffix)
       if (cmd != NULL)
        break;
 
+      /* Got partial input.  I.e., got a line that ends with a
+        continuation character (backslash).  Suppress printing the
+        prompt again.  */
       prompt = NULL;
     }
 
This page took 0.024376 seconds and 4 git commands to generate.