PR tui/9584
[deliverable/binutils-gdb.git] / gdb / tui / tui.c
index 9ef3c309e3be6d2eb4c62a28eb48227032965174..3e79b32233695c71a21d19f6557fb72ac18f8108 100644 (file)
@@ -240,12 +240,13 @@ tui_rl_command_key (int count, int key)
     {
       if (tui_commands[i].key == key)
         {
-          /* Must save the command because it can be modified by
-             execute_command.  */
-          char *cmd = alloca (strlen (tui_commands[i].cmd) + 1);
-
-          strcpy (cmd, tui_commands[i].cmd);
-          execute_command (cmd, TRUE);
+          /* Insert the command in the readline buffer.
+             Avoid calling the gdb command here since it creates
+             a possible recursion on readline if prompt_for_continue
+             is called (See PR 9584).  The command will also appear
+             in the readline history which turns out to be better.  */
+          rl_insert_text (tui_commands[i].cmd);
+          rl_newline (1, '\n');
           return 0;
         }
     }
This page took 0.026804 seconds and 4 git commands to generate.