gdb/testsuite: some additional tests in gdb.tui/scroll.exp
[binutils-gdb.git] / gdb / agent.c
index 79bb32ea55cbcebbed79d344f97c289025760c2b..28c1340f79d482adb9d4b828668db25b583afbd1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2021 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -40,9 +40,9 @@ static void
 show_can_use_agent (struct ui_file *file, int from_tty,
                    struct cmd_list_element *c, const char *value)
 {
-  fprintf_filtered (file,
-                   _("Debugger's willingness to use agent in inferior "
-                     "as a helper is %s.\n"), value);
+  gdb_printf (file,
+             _("Debugger's willingness to use agent in inferior "
+               "as a helper is %s.\n"), value);
 }
 
 static void
@@ -78,7 +78,8 @@ void _initialize_agent ();
 void
 _initialize_agent ()
 {
-  gdb::observers::new_objfile.attach (agent_new_objfile);
+  gdb::observers::new_objfile.attach (agent_new_objfile,
+                                     "agent");
 
   add_setshow_enum_cmd ("agent", class_run,
                        can_use_agent_enum,