]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix build after command_classes change
authorTom Tromey <tromey@adacore.com>
Thu, 6 Nov 2025 15:33:08 +0000 (08:33 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 6 Nov 2025 15:33:08 +0000 (08:33 -0700)
Commit 7028626eff3 (gdb: make command classes be bitmaps) broke the
build, causing the compiler to issue an error message about the global
scm-cmd.c:command_classes being redefined as a different type.
Renaming the global fix the problem.

gdb/guile/scm-cmd.c

index d2172d98618789897b4693e162f4b7785a6fd296..1a64ad2e5910a1ea1f5f24b3597a1ac85cf0b0db 100644 (file)
@@ -548,7 +548,7 @@ gdbscm_parse_command_name (const char *name,
   /* NOTREACHED */
 }
 
-static const scheme_integer_constant command_classes[] =
+static const scheme_integer_constant gdbscm_command_classes[] =
 {
   /* Note: alias and user are special; pseudo appears to be unused,
      and there is no reason to expose tui, I think.  */
@@ -576,9 +576,9 @@ gdbscm_valid_command_class_p (int command_class)
 {
   int i;
 
-  for (i = 0; command_classes[i].name != NULL; ++i)
+  for (i = 0; gdbscm_command_classes[i].name != NULL; ++i)
     {
-      if (command_classes[i].value == command_class)
+      if (gdbscm_command_classes[i].value == command_class)
        return 1;
     }
 
@@ -903,7 +903,7 @@ gdbscm_initialize_commands (void)
     = gdbscm_make_smob_type (command_smob_name, sizeof (command_smob));
   scm_set_smob_print (command_smob_tag, cmdscm_print_command_smob);
 
-  gdbscm_define_integer_constants (command_classes, 1);
+  gdbscm_define_integer_constants (gdbscm_command_classes, 1);
   gdbscm_define_functions (command_functions, 1);
 
   for (i = 0; i < N_COMPLETERS; ++i)