--- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -8910,6 +8910,7 @@ update_dprintf_command_list (struct brea { char *dprintf_args = b->extra_string; char *printf_line = NULL; + int need_continue = 0; if (!dprintf_args) return; @@ -8950,6 +8951,7 @@ update_dprintf_command_list (struct brea { warning (_("Target cannot run dprintf commands, falling back to GDB printf")); printf_line = xstrprintf ("printf %s", dprintf_args); + need_continue = 1; } } else @@ -8961,7 +8963,8 @@ update_dprintf_command_list (struct brea { struct command_line *printf_cmd_line, *cont_cmd_line = NULL; - if (strcmp (dprintf_style, dprintf_style_agent) != 0) + if (strcmp (dprintf_style, dprintf_style_agent) != 0 + || need_continue) { cont_cmd_line = xmalloc (sizeof (struct command_line)); cont_cmd_line->control_type = simple_control;