gdb/amd-dbgapi-target: Use inf param in detach
[binutils-gdb.git] / gdb / record.c
index 37619780d37dfb97710d3556f0bed24e1b1ee015..f7c82665b0586d78fa6744a9b80bd59bb8db3302 100644 (file)
@@ -1,6 +1,6 @@
 /* Process record and replay target for GDB, the GNU debugger.
 
-   Copyright (C) 2008-2021 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,6 +26,7 @@
 #include "gdbsupport/common-utils.h"
 #include "cli/cli-utils.h"
 #include "disasm.h"
+#include "interps.h"
 
 #include <ctype.h>
 
@@ -55,7 +56,7 @@ struct cmd_list_element *info_record_cmdlist = NULL;
 
 #define DEBUG(msg, args...)                                            \
   if (record_debug)                                                    \
-    fprintf_unfiltered (gdb_stdlog, "record: " msg "\n", ##args)
+    gdb_printf (gdb_stdlog, "record: " msg "\n", ##args)
 
 /* See record.h.  */
 
@@ -257,8 +258,8 @@ static void
 show_record_debug (struct ui_file *file, int from_tty,
                   struct cmd_list_element *c, const char *value)
 {
-  fprintf_filtered (file, _("Debugging of process record target is %s.\n"),
-                   value);
+  gdb_printf (file, _("Debugging of process record target is %s.\n"),
+             value);
 }
 
 /* Alias for "target record".  */
@@ -279,14 +280,14 @@ cmd_record_delete (const char *args, int from_tty)
 
   if (!target_record_is_replaying (inferior_ptid))
     {
-      printf_unfiltered (_("Already at end of record list.\n"));
+      gdb_printf (_("Already at end of record list.\n"));
       return;
     }
 
   if (!target_supports_delete_record ())
     {
-      printf_unfiltered (_("The current record target does not support "
-                          "this operation.\n"));
+      gdb_printf (_("The current record target does not support "
+                   "this operation.\n"));
       return;
     }
 
@@ -308,10 +309,10 @@ cmd_record_stop (const char *args, int from_tty)
   record_stop (t);
   record_unpush (t);
 
-  printf_unfiltered (_("Process record is stopped and all execution "
-                      "logs are deleted.\n"));
+  gdb_printf (_("Process record is stopped and all execution "
+               "logs are deleted.\n"));
 
-  gdb::observers::record_changed.notify (current_inferior (), 0, NULL, NULL);
+  interps_notify_record_changed (current_inferior (), 0, NULL, NULL);
 }
 
 
@@ -325,11 +326,11 @@ info_record_command (const char *args, int from_tty)
   t = find_record_target ();
   if (t == NULL)
     {
-      printf_filtered (_("No recording is currently active.\n"));
+      gdb_printf (_("No recording is currently active.\n"));
       return;
     }
 
-  printf_filtered (_("Active record target: %s\n"), t->shortname ());
+  gdb_printf (_("Active record target: %s\n"), t->shortname ());
   t->info_record ();
 }
 
@@ -494,6 +495,9 @@ get_insn_history_modifiers (const char **arg)
            case 'r':
              modifiers |= DISASSEMBLY_RAW_INSN;
              break;
+           case 'b':
+             modifiers |= DISASSEMBLY_RAW_BYTES;
+             break;
            case 'f':
              modifiers |= DISASSEMBLY_OMIT_FNAME;
              break;