+2012-11-10 Stephane Carrez <Stephane.Carrez@gmail.com>
+
+ PR tui/9584
+
+ * tui/tui.c (tui_rl_command_key): Do not call execute_command
+ but insert the command to execute in readline's buffer.
+
2012-11-09 Tom Tromey <tromey@redhat.com>
* gdbarch.sh (target_gdbarch): Remove macro.
{
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;
}
}