]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: Convert gdb/mingw-hdep.c to INIT_GDB_FILE
authorPedro Alves <pedro@palves.net>
Fri, 25 Jul 2025 16:43:52 +0000 (17:43 +0100)
committerPedro Alves <pedro@palves.net>
Fri, 25 Jul 2025 16:58:39 +0000 (17:58 +0100)
I noticed that my MinGW GDB did not have the "maint set
console-translation-mode" command, even though the code to register it
is in gdb/mingw-hdep.c.

The problem is that gdb/mingw-hdep.c is not using INIT_GDB_FILE.  This
fixes it.

Change-Id: I3aa305c517e100d4733b391a110a1b20b89fdb7f

gdb/mingw-hdep.c

index 481bd41e1527a55f1e263d6cda90d32f63c97a4c..a4e9cf5005f0401fd5218b7092374132e68a614f 100644 (file)
@@ -493,10 +493,7 @@ show_maint_console_translation_mode (struct ui_file *file, int from_tty,
              console_translation_mode.c_str ());
 }
 
-extern void _initialize_mingw_hdep ();
-
-void
-_initialize_mingw_hdep ()
+INIT_GDB_FILE (mingw_hdep)
 {
   add_setshow_string_cmd ("console-translation-mode",
                          class_maintenance,