This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 01/18] poison "class"


From: Tom Tromey <tromey@redhat.com>

gdb/ChangeLog

2013-10-21  Tom Tromey  <tromey@redhat.com>

	* amd64-tdep.c (reg_class): Renamed from class.
	* c-exp.y (objc_class): Likewise.
	* cli/cli-cmds.c (struct cmd_list_element): Rename field class to cmd_class.
	* cli/cli-decode.c (struct cmd_list_element): Likewise.
	* cli/cli-decode.h (struct cmd_list_element): Likewise.
	* cli/cli-script.c (struct cmd_list_element): Likewise.
	* cli/cli-setshow.c (struct cmd_list_element): Likewise.
	* command.h (cmd_class): Renamed from class.
	* mdebugread.c (addr_class): Likewise.
	* objc-lang.c (struct objc_super): Rename field class to objc_class.
	* parser-defs.h (objc_class): Renamed from class.
	* psymtab.c (addr_class): Likewise.
	* python/py-symbol.c (addr_class): Likewise.
	* top.c (struct cmd_list_element): Rename field class to cmd_class.
---
 gdb/amd64-tdep.c       |  74 ++++++++++++-------------
 gdb/c-exp.y            |  18 +++----
 gdb/cli/cli-cmds.c     |   4 +-
 gdb/cli/cli-decode.c   | 143 +++++++++++++++++++++++++------------------------
 gdb/cli/cli-decode.h   |   2 +-
 gdb/cli/cli-script.c   |  10 ++--
 gdb/cli/cli-setshow.c  |   6 +--
 gdb/command.h          |  24 ++++-----
 gdb/mdebugread.c       |  36 ++++++-------
 gdb/objc-lang.c        |  60 +++++++++++----------
 gdb/parser-defs.h      |   2 +-
 gdb/psymtab.c          |  12 ++---
 gdb/python/py-symbol.c |  25 +++++----
 gdb/top.c              |   2 +-
 14 files changed, 213 insertions(+), 205 deletions(-)

diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 4d6b325..0a74b60 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -456,19 +456,19 @@ amd64_non_pod_p (struct type *type)
    arrays) and union types, and store the result in CLASS.  */
 
 static void
-amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
+amd64_classify_aggregate (struct type *type, enum amd64_reg_class reg_class[2])
 {
   /* 1. If the size of an object is larger than two eightbytes, or in
         C++, is a non-POD structure or union type, or contains
         unaligned fields, it has class memory.  */
   if (TYPE_LENGTH (type) > 16 || amd64_non_pod_p (type))
     {
-      class[0] = class[1] = AMD64_MEMORY;
+      reg_class[0] = reg_class[1] = AMD64_MEMORY;
       return;
     }
 
   /* 2. Both eightbytes get initialized to class NO_CLASS.  */
-  class[0] = class[1] = AMD64_NO_CLASS;
+  reg_class[0] = reg_class[1] = AMD64_NO_CLASS;
 
   /* 3. Each field of an object is classified recursively so that
         always two fields are considered. The resulting class is
@@ -480,9 +480,9 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
       struct type *subtype = check_typedef (TYPE_TARGET_TYPE (type));
 
       /* All fields in an array have the same type.  */
-      amd64_classify (subtype, class);
-      if (TYPE_LENGTH (type) > 8 && class[1] == AMD64_NO_CLASS)
-	class[1] = class[0];
+      amd64_classify (subtype, reg_class);
+      if (TYPE_LENGTH (type) > 8 && reg_class[1] == AMD64_NO_CLASS)
+	reg_class[1] = reg_class[0];
     }
   else
     {
@@ -511,7 +511,7 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
 	  gdb_assert (pos == 0 || pos == 1);
 
 	  amd64_classify (subtype, subclass);
-	  class[pos] = amd64_merge_classes (class[pos], subclass[0]);
+	  reg_class[pos] = amd64_merge_classes (reg_class[pos], subclass[0]);
 	  if (bitsize <= 64 && pos == 0 && endpos == 1)
 	    /* This is a bit of an odd case:  We have a field that would
 	       normally fit in one of the two eightbytes, except that
@@ -535,9 +535,9 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
 	       use up all 16 bytes of the aggregate, and are already
 	       handled just fine (because each portion sits on its own
 	       8-byte).  */
-	    class[1] = amd64_merge_classes (class[1], subclass[0]);
+	    reg_class[1] = amd64_merge_classes (reg_class[1], subclass[0]);
 	  if (pos == 0)
-	    class[1] = amd64_merge_classes (class[1], subclass[1]);
+	    reg_class[1] = amd64_merge_classes (reg_class[1], subclass[1]);
 	}
     }
 
@@ -545,26 +545,26 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
 
   /* Rule (a): If one of the classes is MEMORY, the whole argument is
      passed in memory.  */
-  if (class[0] == AMD64_MEMORY || class[1] == AMD64_MEMORY)
-    class[0] = class[1] = AMD64_MEMORY;
+  if (reg_class[0] == AMD64_MEMORY || reg_class[1] == AMD64_MEMORY)
+    reg_class[0] = reg_class[1] = AMD64_MEMORY;
 
   /* Rule (b): If SSEUP is not preceded by SSE, it is converted to
      SSE.  */
-  if (class[0] == AMD64_SSEUP)
-    class[0] = AMD64_SSE;
-  if (class[1] == AMD64_SSEUP && class[0] != AMD64_SSE)
-    class[1] = AMD64_SSE;
+  if (reg_class[0] == AMD64_SSEUP)
+    reg_class[0] = AMD64_SSE;
+  if (reg_class[1] == AMD64_SSEUP && reg_class[0] != AMD64_SSE)
+    reg_class[1] = AMD64_SSE;
 }
 
 /* Classify TYPE, and store the result in CLASS.  */
 
 static void
-amd64_classify (struct type *type, enum amd64_reg_class class[2])
+amd64_classify (struct type *type, enum amd64_reg_class reg_class[2])
 {
   enum type_code code = TYPE_CODE (type);
   int len = TYPE_LENGTH (type);
 
-  class[0] = class[1] = AMD64_NO_CLASS;
+  reg_class[0] = reg_class[1] = AMD64_NO_CLASS;
 
   /* Arguments of types (signed and unsigned) _Bool, char, short, int,
      long, long long, and pointers are in the INTEGER class.  Similarly,
@@ -575,28 +575,28 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2])
        || code == TYPE_CODE_CHAR
        || code == TYPE_CODE_PTR || code == TYPE_CODE_REF)
       && (len == 1 || len == 2 || len == 4 || len == 8))
-    class[0] = AMD64_INTEGER;
+    reg_class[0] = AMD64_INTEGER;
 
   /* Arguments of types float, double, _Decimal32, _Decimal64 and __m64
      are in class SSE.  */
   else if ((code == TYPE_CODE_FLT || code == TYPE_CODE_DECFLOAT)
 	   && (len == 4 || len == 8))
     /* FIXME: __m64 .  */
-    class[0] = AMD64_SSE;
+    reg_class[0] = AMD64_SSE;
 
   /* Arguments of types __float128, _Decimal128 and __m128 are split into
      two halves.  The least significant ones belong to class SSE, the most
      significant one to class SSEUP.  */
   else if (code == TYPE_CODE_DECFLOAT && len == 16)
     /* FIXME: __float128, __m128.  */
-    class[0] = AMD64_SSE, class[1] = AMD64_SSEUP;
+    reg_class[0] = AMD64_SSE, reg_class[1] = AMD64_SSEUP;
 
   /* The 64-bit mantissa of arguments of type long double belongs to
      class X87, the 16-bit exponent plus 6 bytes of padding belongs to
      class X87UP.  */
   else if (code == TYPE_CODE_FLT && len == 16)
     /* Class X87 and X87UP.  */
-    class[0] = AMD64_X87, class[1] = AMD64_X87UP;
+    reg_class[0] = AMD64_X87, reg_class[1] = AMD64_X87UP;
 
   /* Arguments of complex T where T is one of the types float or
      double get treated as if they are implemented as:
@@ -606,19 +606,19 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2])
        T imag;
      };  */
   else if (code == TYPE_CODE_COMPLEX && len == 8)
-    class[0] = AMD64_SSE;
+    reg_class[0] = AMD64_SSE;
   else if (code == TYPE_CODE_COMPLEX && len == 16)
-    class[0] = class[1] = AMD64_SSE;
+    reg_class[0] = reg_class[1] = AMD64_SSE;
 
   /* A variable of type complex long double is classified as type
      COMPLEX_X87.  */
   else if (code == TYPE_CODE_COMPLEX && len == 32)
-    class[0] = AMD64_COMPLEX_X87;
+    reg_class[0] = AMD64_COMPLEX_X87;
 
   /* Aggregates.  */
   else if (code == TYPE_CODE_ARRAY || code == TYPE_CODE_STRUCT
 	   || code == TYPE_CODE_UNION)
-    amd64_classify_aggregate (type, class);
+    amd64_classify_aggregate (type, reg_class);
 }
 
 static enum return_value_convention
@@ -626,7 +626,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
 		    struct type *type, struct regcache *regcache,
 		    gdb_byte *readbuf, const gdb_byte *writebuf)
 {
-  enum amd64_reg_class class[2];
+  enum amd64_reg_class reg_class[2];
   int len = TYPE_LENGTH (type);
   static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM };
   static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM };
@@ -637,7 +637,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
   gdb_assert (!(readbuf && writebuf));
 
   /* 1. Classify the return type with the classification algorithm.  */
-  amd64_classify (type, class);
+  amd64_classify (type, reg_class);
 
   /* 2. If the type has class MEMORY, then the caller provides space
      for the return value and passes the address of this storage in
@@ -646,7 +646,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
 
      On return %rax will contain the address that has been passed in
      by the caller in %rdi.  */
-  if (class[0] == AMD64_MEMORY)
+  if (reg_class[0] == AMD64_MEMORY)
     {
       /* As indicated by the comment above, the ABI guarantees that we
          can always find the return value just after the function has
@@ -665,7 +665,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
 
   /* 8. If the class is COMPLEX_X87, the real part of the value is
         returned in %st0 and the imaginary part in %st1.  */
-  if (class[0] == AMD64_COMPLEX_X87)
+  if (reg_class[0] == AMD64_COMPLEX_X87)
     {
       if (readbuf)
 	{
@@ -687,7 +687,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
 
-  gdb_assert (class[1] != AMD64_MEMORY);
+  gdb_assert (reg_class[1] != AMD64_MEMORY);
   gdb_assert (len <= 16);
 
   for (i = 0; len > 0; i++, len -= 8)
@@ -695,7 +695,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
       int regnum = -1;
       int offset = 0;
 
-      switch (class[i])
+      switch (reg_class[i])
 	{
 	case AMD64_INTEGER:
 	  /* 3. If the class is INTEGER, the next available register
@@ -728,7 +728,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
 	case AMD64_X87UP:
 	  /* 7. If the class is X87UP, the value is returned together
              with the previous X87 value in %st0.  */
-	  gdb_assert (i > 0 && class[0] == AMD64_X87);
+	  gdb_assert (i > 0 && reg_class[0] == AMD64_X87);
 	  regnum = AMD64_ST0_REGNUM;
 	  offset = 8;
 	  len = 2;
@@ -792,21 +792,21 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
     {
       struct type *type = value_type (args[i]);
       int len = TYPE_LENGTH (type);
-      enum amd64_reg_class class[2];
+      enum amd64_reg_class reg_class[2];
       int needed_integer_regs = 0;
       int needed_sse_regs = 0;
       int j;
 
       /* Classify argument.  */
-      amd64_classify (type, class);
+      amd64_classify (type, reg_class);
 
       /* Calculate the number of integer and SSE registers needed for
          this argument.  */
       for (j = 0; j < 2; j++)
 	{
-	  if (class[j] == AMD64_INTEGER)
+	  if (reg_class[j] == AMD64_INTEGER)
 	    needed_integer_regs++;
-	  else if (class[j] == AMD64_SSE)
+	  else if (reg_class[j] == AMD64_SSE)
 	    needed_sse_regs++;
 	}
 
@@ -833,7 +833,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
 	      int regnum = -1;
 	      int offset = 0;
 
-	      switch (class[j])
+	      switch (reg_class[j])
 		{
 		case AMD64_INTEGER:
 		  regnum = integer_regnum[integer_reg++];
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 77713dd..a796dbb 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -159,7 +159,7 @@ void yyerror (char *);
 
     struct type_stack *type_stack;
 
-    struct objc_class_str class;
+    struct objc_class_str objc_class;
   }
 
 %{
@@ -206,7 +206,7 @@ static void c_print_token (FILE *file, int type, YYSTYPE value);
 %token <ssym> UNKNOWN_CPP_NAME
 %token <voidval> COMPLETE
 %token <tsym> TYPENAME
-%token <class> CLASSNAME	/* ObjC Class name */
+%token <objc_class> CLASSNAME	/* ObjC Class name */
 %type <sval> name
 %type <svec> string_exp
 %type <ssym> name_not_typename
@@ -470,16 +470,16 @@ exp	:	exp OBJC_LBRAC exp1 ']'
 
 exp	: 	OBJC_LBRAC TYPENAME
 			{
-			  CORE_ADDR class;
+			  CORE_ADDR objc_class;
 
-			  class = lookup_objc_class (parse_gdbarch,
+			  objc_class = lookup_objc_class (parse_gdbarch,
 						     copy_name ($2.stoken));
-			  if (class == 0)
+			  if (objc_class == 0)
 			    error (_("%s is not an ObjC Class"),
 				   copy_name ($2.stoken));
 			  write_exp_elt_opcode (OP_LONG);
 			  write_exp_elt_type (parse_type->builtin_int);
-			  write_exp_elt_longcst ((LONGEST) class);
+			  write_exp_elt_longcst ((LONGEST) objc_class);
 			  write_exp_elt_opcode (OP_LONG);
 			  start_msglist();
 			}
@@ -494,7 +494,7 @@ exp	:	OBJC_LBRAC CLASSNAME
 			{
 			  write_exp_elt_opcode (OP_LONG);
 			  write_exp_elt_type (parse_type->builtin_int);
-			  write_exp_elt_longcst ((LONGEST) $2.class);
+			  write_exp_elt_longcst ((LONGEST) $2.objc_class);
 			  write_exp_elt_opcode (OP_LONG);
 			  start_msglist();
 			}
@@ -2889,10 +2889,10 @@ classify_name (const struct block *block)
       CORE_ADDR Class = lookup_objc_class (parse_gdbarch, copy);
       if (Class)
 	{
-	  yylval.class.class = Class;
+	  yylval.objc_class.objc_class = Class;
 	  sym = lookup_struct_typedef (copy, expression_context_block, 1);
 	  if (sym)
-	    yylval.class.type = SYMBOL_TYPE (sym);
+	    yylval.objc_class.type = SYMBOL_TYPE (sym);
 	  return CLASSNAME;
 	}
     }
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 0ef325d..18aaba1 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1228,7 +1228,7 @@ show_user (char *args, int from_tty)
 
       c = lookup_cmd (&comname, cmdlist, "", 0, 1);
       /* c->user_commands would be NULL if it's a python command.  */
-      if (c->class != class_user || !c->user_commands)
+      if (c->cmd_class != class_user || !c->user_commands)
 	error (_("Not a user command."));
       show_user_1 (c, "", args, gdb_stdout);
     }
@@ -1236,7 +1236,7 @@ show_user (char *args, int from_tty)
     {
       for (c = cmdlist; c; c = c->next)
 	{
-	  if (c->class == class_user || c->prefixlist != NULL)
+	  if (c->cmd_class == class_user || c->prefixlist != NULL)
 	    show_user_1 (c, "", c->name, gdb_stdout);
 	}
     }
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 7e315c1..9d82bd0 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -183,8 +183,8 @@ set_cmd_completer (struct cmd_list_element *cmd, completer_ftype *completer)
    of *LIST).  */
 
 struct cmd_list_element *
-add_cmd (const char *name, enum command_class class, void (*fun) (char *, int),
-	 char *doc, struct cmd_list_element **list)
+add_cmd (const char *name, enum command_class cmd_class,
+	 void (*fun) (char *, int), char *doc, struct cmd_list_element **list)
 {
   struct cmd_list_element *c
     = (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
@@ -222,7 +222,7 @@ add_cmd (const char *name, enum command_class class, void (*fun) (char *, int),
     }
 
   c->name = name;
-  c->class = class;
+  c->cmd_class = cmd_class;
   set_cmd_cfunc (c, fun);
   set_cmd_context (c, NULL);
   c->doc = doc;
@@ -272,8 +272,9 @@ deprecate_cmd (struct cmd_list_element *cmd, char *replacement)
 }
 
 struct cmd_list_element *
-add_alias_cmd (const char *name, const char *oldname, enum command_class class,
-	       int abbrev_flag, struct cmd_list_element **list)
+add_alias_cmd (const char *name, const char *oldname,
+	       enum command_class cmd_class, int abbrev_flag,
+	       struct cmd_list_element **list)
 {
   const char *tmp;
   struct cmd_list_element *old;
@@ -295,7 +296,7 @@ add_alias_cmd (const char *name, const char *oldname, enum command_class class,
       return 0;
     }
 
-  c = add_cmd (name, class, NULL, old->doc, list);
+  c = add_cmd (name, cmd_class, NULL, old->doc, list);
 
   /* If OLD->DOC can be freed, we should make another copy.  */
   if ((old->flags & DOC_ALLOCATED) != 0)
@@ -324,13 +325,13 @@ add_alias_cmd (const char *name, const char *oldname, enum command_class class,
    containing that list.  */
 
 struct cmd_list_element *
-add_prefix_cmd (const char *name, enum command_class class,
+add_prefix_cmd (const char *name, enum command_class cmd_class,
 		void (*fun) (char *, int),
 		char *doc, struct cmd_list_element **prefixlist,
 		char *prefixname, int allow_unknown,
 		struct cmd_list_element **list)
 {
-  struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+  struct cmd_list_element *c = add_cmd (name, cmd_class, fun, doc, list);
   struct cmd_list_element *p;
 
   c->prefixlist = prefixlist;
@@ -352,12 +353,12 @@ add_prefix_cmd (const char *name, enum command_class class,
 /* Like add_prefix_cmd but sets the abbrev_flag on the new command.  */
 
 struct cmd_list_element *
-add_abbrev_prefix_cmd (const char *name, enum command_class class,
+add_abbrev_prefix_cmd (const char *name, enum command_class cmd_class,
 		       void (*fun) (char *, int), char *doc,
 		       struct cmd_list_element **prefixlist, char *prefixname,
 		       int allow_unknown, struct cmd_list_element **list)
 {
-  struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+  struct cmd_list_element *c = add_cmd (name, cmd_class, fun, doc, list);
 
   c->prefixlist = prefixlist;
   c->prefixname = prefixname;
@@ -383,7 +384,7 @@ empty_sfunc (char *args, int from_tty, struct cmd_list_element *c)
 /* Add element named NAME to command list LIST (the list for set/show
    or some sublist thereof).
    TYPE is set_cmd or show_cmd.
-   CLASS is as in add_cmd.
+   KLASS is as in add_cmd.
    VAR_TYPE is the kind of thing we are setting.
    VAR is address of the variable being controlled by this command.
    DOC is the documentation string.  */
@@ -391,13 +392,13 @@ empty_sfunc (char *args, int from_tty, struct cmd_list_element *c)
 static struct cmd_list_element *
 add_set_or_show_cmd (const char *name,
 		     enum cmd_types type,
-		     enum command_class class,
+		     enum command_class cmd_class,
 		     var_types var_type,
 		     void *var,
 		     char *doc,
 		     struct cmd_list_element **list)
 {
-  struct cmd_list_element *c = add_cmd (name, class, NULL, doc, list);
+  struct cmd_list_element *c = add_cmd (name, cmd_class, NULL, doc, list);
 
   gdb_assert (type == set_cmd || type == show_cmd);
   c->type = type;
@@ -410,7 +411,7 @@ add_set_or_show_cmd (const char *name,
 }
 
 /* Add element named NAME to both the command SET_LIST and SHOW_LIST.
-   CLASS is as in add_cmd.  VAR_TYPE is the kind of thing we are
+   KLASS is as in add_cmd.  VAR_TYPE is the kind of thing we are
    setting.  VAR is address of the variable being controlled by this
    command.  SET_FUNC and SHOW_FUNC are the callback functions (if
    non-NULL).  SET_DOC, SHOW_DOC and HELP_DOC are the documentation
@@ -420,7 +421,7 @@ add_set_or_show_cmd (const char *name,
 
 static void
 add_setshow_cmd_full (const char *name,
-		      enum command_class class,
+		      enum command_class cmd_class,
 		      var_types var_type, void *var,
 		      const char *set_doc, const char *show_doc,
 		      const char *help_doc,
@@ -446,7 +447,7 @@ add_setshow_cmd_full (const char *name,
       full_set_doc = xstrdup (set_doc);
       full_show_doc = xstrdup (show_doc);
     }
-  set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
+  set = add_set_or_show_cmd (name, set_cmd, cmd_class, var_type, var,
 			     full_set_doc, set_list);
   set->flags |= DOC_ALLOCATED;
 
@@ -455,7 +456,7 @@ add_setshow_cmd_full (const char *name,
 
   set_cmd_prefix (set, set_list);
 
-  show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
+  show = add_set_or_show_cmd (name, show_cmd, cmd_class, var_type, var,
 			      full_show_doc, show_list);
   show->flags |= DOC_ALLOCATED;
   show->show_value_func = show_func;
@@ -467,13 +468,13 @@ add_setshow_cmd_full (const char *name,
 }
 
 /* Add element named NAME to command list LIST (the list for set or
-   some sublist thereof).  CLASS is as in add_cmd.  ENUMLIST is a list
+   some sublist thereof).  KLASS is as in add_cmd.  ENUMLIST is a list
    of strings which may follow NAME.  VAR is address of the variable
    which will contain the matching string (from ENUMLIST).  */
 
 void
 add_setshow_enum_cmd (const char *name,
-		      enum command_class class,
+		      enum command_class cmd_class,
 		      const char *const *enumlist,
 		      const char **var,
 		      const char *set_doc,
@@ -486,7 +487,7 @@ add_setshow_enum_cmd (const char *name,
 {
   struct cmd_list_element *c;
 
-  add_setshow_cmd_full (name, class, var_enum, var,
+  add_setshow_cmd_full (name, cmd_class, var_enum, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -497,12 +498,12 @@ add_setshow_enum_cmd (const char *name,
 const char * const auto_boolean_enums[] = { "on", "off", "auto", NULL };
 
 /* Add an auto-boolean command named NAME to both the set and show
-   command list lists.  CLASS is as in add_cmd.  VAR is address of the
+   command list lists.  KLASS is as in add_cmd.  VAR is address of the
    variable which will contain the value.  DOC is the documentation
    string.  FUNC is the corresponding callback.  */
 void
 add_setshow_auto_boolean_cmd (const char *name,
-			      enum command_class class,
+			      enum command_class cmd_class,
 			      enum auto_boolean *var,
 			      const char *set_doc, const char *show_doc,
 			      const char *help_doc,
@@ -513,7 +514,7 @@ add_setshow_auto_boolean_cmd (const char *name,
 {
   struct cmd_list_element *c;
 
-  add_setshow_cmd_full (name, class, var_auto_boolean, var,
+  add_setshow_cmd_full (name, cmd_class, var_auto_boolean, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -522,11 +523,12 @@ add_setshow_auto_boolean_cmd (const char *name,
 }
 
 /* Add element named NAME to both the set and show command LISTs (the
-   list for set/show or some sublist thereof).  CLASS is as in
+   list for set/show or some sublist thereof).  KLASS is as in
    add_cmd.  VAR is address of the variable which will contain the
    value.  SET_DOC and SHOW_DOC are the documentation strings.  */
 void
-add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
+add_setshow_boolean_cmd (const char *name, enum command_class cmd_class,
+			 int *var,
 			 const char *set_doc, const char *show_doc,
 			 const char *help_doc,
 			 cmd_sfunc_ftype *set_func,
@@ -537,7 +539,7 @@ add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
   static const char *boolean_enums[] = { "on", "off", NULL };
   struct cmd_list_element *c;
 
-  add_setshow_cmd_full (name, class, var_boolean, var,
+  add_setshow_cmd_full (name, cmd_class, var_boolean, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -548,7 +550,7 @@ add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
 /* Add element named NAME to both the set and show command LISTs (the
    list for set/show or some sublist thereof).  */
 void
-add_setshow_filename_cmd (const char *name, enum command_class class,
+add_setshow_filename_cmd (const char *name, enum command_class cmd_class,
 			  char **var,
 			  const char *set_doc, const char *show_doc,
 			  const char *help_doc,
@@ -559,7 +561,7 @@ add_setshow_filename_cmd (const char *name, enum command_class class,
 {
   struct cmd_list_element *set_result;
 
-  add_setshow_cmd_full (name, class, var_filename, var,
+  add_setshow_cmd_full (name, cmd_class, var_filename, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -570,7 +572,7 @@ add_setshow_filename_cmd (const char *name, enum command_class class,
 /* Add element named NAME to both the set and show command LISTs (the
    list for set/show or some sublist thereof).  */
 void
-add_setshow_string_cmd (const char *name, enum command_class class,
+add_setshow_string_cmd (const char *name, enum command_class cmd_class,
 			char **var,
 			const char *set_doc, const char *show_doc,
 			const char *help_doc,
@@ -579,7 +581,7 @@ add_setshow_string_cmd (const char *name, enum command_class class,
 			struct cmd_list_element **set_list,
 			struct cmd_list_element **show_list)
 {
-  add_setshow_cmd_full (name, class, var_string, var,
+  add_setshow_cmd_full (name, cmd_class, var_string, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -589,7 +591,7 @@ add_setshow_string_cmd (const char *name, enum command_class class,
 /* Add element named NAME to both the set and show command LISTs (the
    list for set/show or some sublist thereof).  */
 struct cmd_list_element *
-add_setshow_string_noescape_cmd (const char *name, enum command_class class,
+add_setshow_string_noescape_cmd (const char *name, enum command_class cmd_class,
 				 char **var,
 				 const char *set_doc, const char *show_doc,
 				 const char *help_doc,
@@ -600,7 +602,7 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class class,
 {
   struct cmd_list_element *set_cmd;
 
-  add_setshow_cmd_full (name, class, var_string_noescape, var,
+  add_setshow_cmd_full (name, cmd_class, var_string_noescape, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -611,7 +613,8 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class class,
 /* Add element named NAME to both the set and show command LISTs (the
    list for set/show or some sublist thereof).  */
 void
-add_setshow_optional_filename_cmd (const char *name, enum command_class class,
+add_setshow_optional_filename_cmd (const char *name,
+				   enum command_class cmd_class,
 				   char **var,
 				   const char *set_doc, const char *show_doc,
 				   const char *help_doc,
@@ -622,7 +625,7 @@ add_setshow_optional_filename_cmd (const char *name, enum command_class class,
 {
   struct cmd_list_element *set_result;
  
-  add_setshow_cmd_full (name, class, var_optional_filename, var,
+  add_setshow_cmd_full (name, cmd_class, var_optional_filename, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -649,12 +652,12 @@ integer_unlimited_completer (struct cmd_list_element *ignore,
 }
 
 /* Add element named NAME to both the set and show command LISTs (the
-   list for set/show or some sublist thereof).  CLASS is as in
+   list for set/show or some sublist thereof).  KLASS is as in
    add_cmd.  VAR is address of the variable which will contain the
    value.  SET_DOC and SHOW_DOC are the documentation strings.  This
    function is only used in Python API.  Please don't use it elsewhere.  */
 void
-add_setshow_integer_cmd (const char *name, enum command_class class,
+add_setshow_integer_cmd (const char *name, enum command_class cmd_class,
 			 int *var,
 			 const char *set_doc, const char *show_doc,
 			 const char *help_doc,
@@ -665,7 +668,7 @@ add_setshow_integer_cmd (const char *name, enum command_class class,
 {
   struct cmd_list_element *set;
 
-  add_setshow_cmd_full (name, class, var_integer, var,
+  add_setshow_cmd_full (name, cmd_class, var_integer, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -675,11 +678,11 @@ add_setshow_integer_cmd (const char *name, enum command_class class,
 }
 
 /* Add element named NAME to both the set and show command LISTs (the
-   list for set/show or some sublist thereof).  CLASS is as in
+   list for set/show or some sublist thereof).  KLASS is as in
    add_cmd.  VAR is address of the variable which will contain the
    value.  SET_DOC and SHOW_DOC are the documentation strings.  */
 void
-add_setshow_uinteger_cmd (const char *name, enum command_class class,
+add_setshow_uinteger_cmd (const char *name, enum command_class cmd_class,
 			  unsigned int *var,
 			  const char *set_doc, const char *show_doc,
 			  const char *help_doc,
@@ -690,7 +693,7 @@ add_setshow_uinteger_cmd (const char *name, enum command_class class,
 {
   struct cmd_list_element *set;
 
-  add_setshow_cmd_full (name, class, var_uinteger, var,
+  add_setshow_cmd_full (name, cmd_class, var_uinteger, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -700,11 +703,11 @@ add_setshow_uinteger_cmd (const char *name, enum command_class class,
 }
 
 /* Add element named NAME to both the set and show command LISTs (the
-   list for set/show or some sublist thereof).  CLASS is as in
+   list for set/show or some sublist thereof).  KLASS is as in
    add_cmd.  VAR is address of the variable which will contain the
    value.  SET_DOC and SHOW_DOC are the documentation strings.  */
 void
-add_setshow_zinteger_cmd (const char *name, enum command_class class,
+add_setshow_zinteger_cmd (const char *name, enum command_class cmd_class,
 			  int *var,
 			  const char *set_doc, const char *show_doc,
 			  const char *help_doc,
@@ -713,7 +716,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class class,
 			  struct cmd_list_element **set_list,
 			  struct cmd_list_element **show_list)
 {
-  add_setshow_cmd_full (name, class, var_zinteger, var,
+  add_setshow_cmd_full (name, cmd_class, var_zinteger, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -722,7 +725,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class class,
 
 void
 add_setshow_zuinteger_unlimited_cmd (const char *name,
-				     enum command_class class,
+				     enum command_class cmd_class,
 				     int *var,
 				     const char *set_doc,
 				     const char *show_doc,
@@ -734,7 +737,7 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
 {
   struct cmd_list_element *set;
 
-  add_setshow_cmd_full (name, class, var_zuinteger_unlimited, var,
+  add_setshow_cmd_full (name, cmd_class, var_zuinteger_unlimited, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -744,11 +747,11 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
 }
 
 /* Add element named NAME to both the set and show command LISTs (the
-   list for set/show or some sublist thereof).  CLASS is as in
+   list for set/show or some sublist thereof).  KLASS is as in
    add_cmd.  VAR is address of the variable which will contain the
    value.  SET_DOC and SHOW_DOC are the documentation strings.  */
 void
-add_setshow_zuinteger_cmd (const char *name, enum command_class class,
+add_setshow_zuinteger_cmd (const char *name, enum command_class cmd_class,
 			   unsigned int *var,
 			   const char *set_doc, const char *show_doc,
 			   const char *help_doc,
@@ -757,7 +760,7 @@ add_setshow_zuinteger_cmd (const char *name, enum command_class class,
 			   struct cmd_list_element **set_list,
 			   struct cmd_list_element **show_list)
 {
-  add_setshow_cmd_full (name, class, var_zuinteger, var,
+  add_setshow_cmd_full (name, cmd_class, var_zuinteger, var,
 			set_doc, show_doc, help_doc,
 			set_func, show_func,
 			set_list, show_list,
@@ -858,19 +861,19 @@ add_info_alias (const char *name, char *oldname, int abbrev_flag)
 /* Add an element to the list of commands.  */
 
 struct cmd_list_element *
-add_com (const char *name, enum command_class class, void (*fun) (char *, int),
-	 char *doc)
+add_com (const char *name, enum command_class cmd_class,
+	 void (*fun) (char *, int), char *doc)
 {
-  return add_cmd (name, class, fun, doc, &cmdlist);
+  return add_cmd (name, cmd_class, fun, doc, &cmdlist);
 }
 
 /* Add an alias or abbreviation command to the list of commands.  */
 
 struct cmd_list_element *
-add_com_alias (const char *name, const char *oldname, enum command_class class,
-	       int abbrev_flag)
+add_com_alias (const char *name, const char *oldname,
+	       enum command_class cmd_class, int abbrev_flag)
 {
-  return add_alias_cmd (name, oldname, class, abbrev_flag, &cmdlist);
+  return add_alias_cmd (name, oldname, cmd_class, abbrev_flag, &cmdlist);
 }
 
 /* Recursively walk the commandlist structures, and print out the
@@ -980,7 +983,7 @@ help_cmd (char *arg, struct ui_file *stream)
 
   /* If this is a class name, print all of the commands in the class.  */
   if (c->func == NULL)
-    help_list (cmdlist, "", c->class, stream);
+    help_list (cmdlist, "", c->cmd_class, stream);
 
   if (c->hook_pre || c->hook_post)
     fprintf_filtered (stream,
@@ -1001,7 +1004,7 @@ help_cmd (char *arg, struct ui_file *stream)
  *
  * LIST is the list.
  * CMDTYPE is the prefix to use in the title string.
- * CLASS is the class with which to list the nodes of this list (see
+ * KLASS is the class with which to list the nodes of this list (see
  * documentation for help_cmd_list below),  As usual, ALL_COMMANDS for
  * everything, ALL_CLASSES for just classes, and non-negative for only things
  * in a specific class.
@@ -1010,7 +1013,7 @@ help_cmd (char *arg, struct ui_file *stream)
  */
 void
 help_list (struct cmd_list_element *list, char *cmdtype,
-	   enum command_class class, struct ui_file *stream)
+	   enum command_class cmd_class, struct ui_file *stream)
 {
   int len;
   char *cmdtype1, *cmdtype2;
@@ -1031,14 +1034,14 @@ help_list (struct cmd_list_element *list, char *cmdtype,
       strcpy (cmdtype2 + len - 1, " sub");
     }
 
-  if (class == all_classes)
+  if (cmd_class == all_classes)
     fprintf_filtered (stream, "List of classes of %scommands:\n\n", cmdtype2);
   else
     fprintf_filtered (stream, "List of %scommands:\n\n", cmdtype2);
 
-  help_cmd_list (list, class, cmdtype, (int) class >= 0, stream);
+  help_cmd_list (list, cmd_class, cmdtype, (int) cmd_class >= 0, stream);
 
-  if (class == all_classes)
+  if (cmd_class == all_classes)
     {
       fprintf_filtered (stream, "\n\
 Type \"help%s\" followed by a class name for a list of commands in ",
@@ -1080,7 +1083,7 @@ help_all (struct ui_file *stream)
       if (c->func == NULL)
 	{
 	  fprintf_filtered (stream, "\nCommand class: %s\n\n", c->name);
-	  help_cmd_list (cmdlist, c->class, "", 1, stream);
+	  help_cmd_list (cmdlist, c->cmd_class, "", 1, stream);
 	}
     }
 
@@ -1093,7 +1096,7 @@ help_all (struct ui_file *stream)
       if (c->abbrev_flag)
         continue;
 
-      if (c->class == no_class)
+      if (c->cmd_class == no_class)
 	{
 	  if (!seen_unclassified)
 	    {
@@ -1154,7 +1157,7 @@ print_help_for_command (struct cmd_list_element *c, char *prefix, int recurse,
       && c->prefixlist != 0
       && c->abbrev_flag == 0)
     /* Subcommands of a prefix command typically have 'all_commands'
-       as class.  If we pass CLASS to recursive invocation,
+       as class.  If we pass KLASS to recursive invocation,
        most often we won't see anything.  */
     help_cmd_list (*c->prefixlist, all_commands, c->prefixname, 1, stream);
 }
@@ -1165,7 +1168,7 @@ print_help_for_command (struct cmd_list_element *c, char *prefix, int recurse,
  * all sublists of LIST.
  * PREFIX is the prefix to print before each command name.
  * STREAM is the stream upon which the output should be written.
- * CLASS should be:
+ * KLASS should be:
  *      A non-negative class number to list only commands in that
  * class.
  *      ALL_COMMANDS to list all commands in list.
@@ -1176,7 +1179,7 @@ print_help_for_command (struct cmd_list_element *c, char *prefix, int recurse,
  * is at the low level, not the high-level).
  */
 void
-help_cmd_list (struct cmd_list_element *list, enum command_class class,
+help_cmd_list (struct cmd_list_element *list, enum command_class cmd_class,
 	       char *prefix, int recurse, struct ui_file *stream)
 {
   struct cmd_list_element *c;
@@ -1184,16 +1187,16 @@ help_cmd_list (struct cmd_list_element *list, enum command_class class,
   for (c = list; c; c = c->next)
     {      
       if (c->abbrev_flag == 0
-	  && (class == all_commands
-	      || (class == all_classes && c->func == NULL)
-	      || (class == c->class && c->func != NULL)))
+	  && (cmd_class == all_commands
+	      || (cmd_class == all_classes && c->func == NULL)
+	      || (cmd_class == c->cmd_class && c->func != NULL)))
 	{
 	  print_help_for_command (c, prefix, recurse, stream);
 	}
       else if (c->abbrev_flag == 0 && recurse
-	       && class == class_user && c->prefixlist != NULL)
+	       && cmd_class == class_user && c->prefixlist != NULL)
 	/* User-defined commands may be subcommands.  */
-	help_cmd_list (*c->prefixlist, class, c->prefixname, 
+	help_cmd_list (*c->prefixlist, cmd_class, c->prefixname,
 		       recurse, stream);
     }
 }
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index bf4dd1d..c34311e 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -62,7 +62,7 @@ struct cmd_list_element
     const char *name;
 
     /* Command class; class values are chosen by application program.  */
-    enum command_class class;
+    enum command_class cmd_class;
 
     /* Function definition of this command.  NULL for command class
        names and for help topics that are not really commands.  NOTE:
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 6ea3243..0dad6f3 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1476,7 +1476,7 @@ define_command (char *comname, int from_tty)
     {
       int q;
 
-      if (c->class == class_user || c->class == class_alias)
+      if (c->cmd_class == class_user || c->cmd_class == class_alias)
 	q = query (_("Redefine command \"%s\"? "), c->name);
       else
 	q = query (_("Really redefine built-in command \"%s\"? "), c->name);
@@ -1528,11 +1528,11 @@ define_command (char *comname, int from_tty)
 	     "Type commands for definition of \"%s\".", comfull);
   cmds = read_command_lines (tmpbuf, from_tty, 1, 0, 0);
 
-  if (c && c->class == class_user)
+  if (c && c->cmd_class == class_user)
     free_command_lines (&c->user_commands);
 
   newc = add_cmd (comname, class_user, user_defined_command,
-		  (c && c->class == class_user)
+		  (c && c->cmd_class == class_user)
 		  ? c->doc : xstrdup ("User-defined."), list);
   newc->user_commands = cmds;
 
@@ -1573,7 +1573,7 @@ document_command (char *comname, int from_tty)
   tem = comname;
   c = lookup_cmd (&tem, *list, "", 0, 1);
 
-  if (c->class != class_user)
+  if (c->cmd_class != class_user)
     error (_("Command \"%s\" is built-in."), comfull);
 
   xsnprintf (tmpbuf, sizeof (tmpbuf), "Type documentation for \"%s\".",
@@ -1677,7 +1677,7 @@ show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name,
       char *prefixname = c->prefixname;
 
       for (c = *c->prefixlist; c != NULL; c = c->next)
-	if (c->class == class_user || c->prefixlist != NULL)
+	if (c->cmd_class == class_user || c->prefixlist != NULL)
 	  show_user_1 (c, prefixname, c->name, gdb_stdout);
       return;
     }
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 45df6f6..0cd36c2 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -38,8 +38,8 @@ notify_command_param_changed_p (int param_changed, struct cmd_list_element *c)
   if (param_changed == 0)
     return 0;
 
-  if (c->class == class_maintenance || c->class == class_deprecated
-      || c->class == class_obscure)
+  if (c->cmd_class == class_maintenance || c->cmd_class == class_deprecated
+      || c->cmd_class == class_obscure)
     return 0;
 
   return 1;
@@ -694,7 +694,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
 	}
       else
 	{
-	  if (list->class != no_set_class)
+	  if (list->cmd_class != no_set_class)
 	    {
 	      struct cleanup *option_chain
 		= make_cleanup_ui_out_tuple_begin_end (uiout, "option");
diff --git a/gdb/command.h b/gdb/command.h
index 81edc43..37a6acf 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -238,7 +238,7 @@ typedef void (show_value_ftype) (struct ui_file *file,
 extern show_value_ftype deprecated_show_value_hack;
 
 extern void add_setshow_enum_cmd (const char *name,
-				  enum command_class class,
+				  enum command_class cmd_class,
 				  const char *const *enumlist,
 				  const char **var,
 				  const char *set_doc,
@@ -250,7 +250,7 @@ extern void add_setshow_enum_cmd (const char *name,
 				  struct cmd_list_element **show_list);
 
 extern void add_setshow_auto_boolean_cmd (const char *name,
-					  enum command_class class,
+					  enum command_class cmd_class,
 					  enum auto_boolean *var,
 					  const char *set_doc,
 					  const char *show_doc,
@@ -261,7 +261,7 @@ extern void add_setshow_auto_boolean_cmd (const char *name,
 					  struct cmd_list_element **show_list);
 
 extern void add_setshow_boolean_cmd (const char *name,
-				     enum command_class class,
+				     enum command_class cmd_class,
 				     int *var,
 				     const char *set_doc, const char *show_doc,
 				     const char *help_doc,
@@ -271,7 +271,7 @@ extern void add_setshow_boolean_cmd (const char *name,
 				     struct cmd_list_element **show_list);
 
 extern void add_setshow_filename_cmd (const char *name,
-				      enum command_class class,
+				      enum command_class cmd_class,
 				      char **var,
 				      const char *set_doc,
 				      const char *show_doc,
@@ -282,7 +282,7 @@ extern void add_setshow_filename_cmd (const char *name,
 				      struct cmd_list_element **show_list);
 
 extern void add_setshow_string_cmd (const char *name,
-				    enum command_class class,
+				    enum command_class cmd_class,
 				    char **var,
 				    const char *set_doc,
 				    const char *show_doc,
@@ -294,7 +294,7 @@ extern void add_setshow_string_cmd (const char *name,
 
 extern struct cmd_list_element *add_setshow_string_noescape_cmd
 		      (const char *name,
-		       enum command_class class,
+		       enum command_class cmd_class,
 		       char **var,
 		       const char *set_doc,
 		       const char *show_doc,
@@ -305,7 +305,7 @@ extern struct cmd_list_element *add_setshow_string_noescape_cmd
 		       struct cmd_list_element **show_list);
 
 extern void add_setshow_optional_filename_cmd (const char *name,
-					       enum command_class class,
+					       enum command_class cmd_class,
 					       char **var,
 					       const char *set_doc,
 					       const char *show_doc,
@@ -316,7 +316,7 @@ extern void add_setshow_optional_filename_cmd (const char *name,
 					       struct cmd_list_element **show_list);
 
 extern void add_setshow_integer_cmd (const char *name,
-				     enum command_class class,
+				     enum command_class cmd_class,
 				     int *var,
 				     const char *set_doc,
 				     const char *show_doc,
@@ -327,7 +327,7 @@ extern void add_setshow_integer_cmd (const char *name,
 				     struct cmd_list_element **show_list);
 
 extern void add_setshow_uinteger_cmd (const char *name,
-				      enum command_class class,
+				      enum command_class cmd_class,
 				      unsigned int *var,
 				      const char *set_doc,
 				      const char *show_doc,
@@ -338,7 +338,7 @@ extern void add_setshow_uinteger_cmd (const char *name,
 				      struct cmd_list_element **show_list);
 
 extern void add_setshow_zinteger_cmd (const char *name,
-				      enum command_class class,
+				      enum command_class cmd_class,
 				      int *var,
 				      const char *set_doc,
 				      const char *show_doc,
@@ -349,7 +349,7 @@ extern void add_setshow_zinteger_cmd (const char *name,
 				      struct cmd_list_element **show_list);
 
 extern void add_setshow_zuinteger_cmd (const char *name,
-				       enum command_class class,
+				       enum command_class cmd_class,
 				       unsigned int *var,
 				       const char *set_doc,
 				       const char *show_doc,
@@ -361,7 +361,7 @@ extern void add_setshow_zuinteger_cmd (const char *name,
 
 extern void
   add_setshow_zuinteger_unlimited_cmd (const char *name,
-				       enum command_class class,
+				       enum command_class cmd_class,
 				       int *var,
 				       const char *set_doc,
 				       const char *show_doc,
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 5549610..c27b114 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -561,7 +561,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
   struct type *t;
   struct field *f;
   int count = 1;
-  enum address_class class;
+  enum address_class addr_class;
   TIR tir;
   long svalue = sh->value;
   int bitsize;
@@ -602,7 +602,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
       break;
 
     case stGlobal:		/* External symbol, goes into global block.  */
-      class = LOC_STATIC;
+      addr_class = LOC_STATIC;
       b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (top_stack->cur_st),
 			     GLOBAL_BLOCK);
       s = new_symbol (name);
@@ -610,7 +610,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
       goto data;
 
     case stStatic:		/* Static data, goes into current block.  */
-      class = LOC_STATIC;
+      addr_class = LOC_STATIC;
       b = top_stack->cur_block;
       s = new_symbol (name);
       if (SC_IS_COMMON (sh->sc))
@@ -631,13 +631,13 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
       s = new_symbol (name);
       SYMBOL_VALUE (s) = svalue;
       if (sh->sc == scRegister)
-	class = mdebug_register_index;
+	addr_class = mdebug_register_index;
       else
-	class = LOC_LOCAL;
+	addr_class = LOC_LOCAL;
 
     data:			/* Common code for symbols describing data.  */
       SYMBOL_DOMAIN (s) = VAR_DOMAIN;
-      SYMBOL_ACLASS_INDEX (s) = class;
+      SYMBOL_ACLASS_INDEX (s) = addr_class;
       add_symbol (s, top_stack->cur_st, b);
 
       /* Type could be missing if file is compiled without debugging info.  */
@@ -3434,7 +3434,7 @@ parse_partial_symbols (struct objfile *objfile)
 	  for (cur_sdx = 0; cur_sdx < fh->csym;)
 	    {
 	      char *name;
-	      enum address_class class;
+	      enum address_class addr_class;
 
 	      (*swap_sym_in) (cur_bfd,
 			      ((char *) debug_info->external_sym
@@ -3587,7 +3587,7 @@ parse_partial_symbols (struct objfile *objfile)
 							 mst_file_bss,
 							 SECT_OFF_BSS (objfile),
 							 objfile);
-		  class = LOC_STATIC;
+		  addr_class = LOC_STATIC;
 		  break;
 
 		case stIndirect:	/* Irix5 forward declaration */
@@ -3599,11 +3599,11 @@ parse_partial_symbols (struct objfile *objfile)
 		     structs from alpha and mips cc.  */
 		  if (sh.iss == 0 || has_opaque_xref (fh, &sh))
 		    goto skip;
-		  class = LOC_TYPEDEF;
+		  addr_class = LOC_TYPEDEF;
 		  break;
 
 		case stConstant:	/* Constant decl */
-		  class = LOC_CONST;
+		  addr_class = LOC_CONST;
 		  break;
 
 		case stUnion:
@@ -3659,7 +3659,7 @@ parse_partial_symbols (struct objfile *objfile)
 		}
 	      /* Use this gdb symbol.  */
 	      add_psymbol_to_list (name, strlen (name), 1,
-				   VAR_DOMAIN, class,
+				   VAR_DOMAIN, addr_class,
 				   &objfile->static_psymbols,
 				   0, sh.value, psymtab_language, objfile);
 	    skip:
@@ -3673,7 +3673,7 @@ parse_partial_symbols (struct objfile *objfile)
 	  PST_PRIVATE (save_pst)->extern_tab = ext_ptr;
 	  for (; --cur_sdx >= 0; ext_ptr++)
 	    {
-	      enum address_class class;
+	      enum address_class addr_class;
 	      SYMR *psh;
 	      char *name;
 	      CORE_ADDR svalue;
@@ -3723,7 +3723,7 @@ parse_partial_symbols (struct objfile *objfile)
 		     Ignore them, as parse_external will ignore them too.  */
 		  continue;
 		case stLabel:
-		  class = LOC_LABEL;
+		  addr_class = LOC_LABEL;
 		  break;
 		default:
 		  unknown_ext_complaint (debug_info->ssext + psh->iss);
@@ -3734,12 +3734,12 @@ parse_partial_symbols (struct objfile *objfile)
 		  if (SC_IS_COMMON (psh->sc))
 		    continue;
 
-		  class = LOC_STATIC;
+		  addr_class = LOC_STATIC;
 		  break;
 		}
 	      name = debug_info->ssext + psh->iss;
 	      add_psymbol_to_list (name, strlen (name), 1,
-				   VAR_DOMAIN, class,
+				   VAR_DOMAIN, addr_class,
 				   &objfile->global_psymbols,
 				   0, svalue,
 				   psymtab_language, objfile);
@@ -4585,7 +4585,7 @@ cross_ref (int fd, union aux_ext *ax, struct type **tpp,
 
 static struct symbol *
 mylookup_symbol (char *name, struct block *block,
-		 domain_enum domain, enum address_class class)
+		 domain_enum domain, enum address_class addr_class)
 {
   struct block_iterator iter;
   int inc;
@@ -4596,14 +4596,14 @@ mylookup_symbol (char *name, struct block *block,
     {
       if (SYMBOL_LINKAGE_NAME (sym)[0] == inc
 	  && SYMBOL_DOMAIN (sym) == domain
-	  && SYMBOL_CLASS (sym) == class
+	  && SYMBOL_CLASS (sym) == addr_class
 	  && strcmp (SYMBOL_LINKAGE_NAME (sym), name) == 0)
 	return sym;
     }
 
   block = BLOCK_SUPERBLOCK (block);
   if (block)
-    return mylookup_symbol (name, block, domain, class);
+    return mylookup_symbol (name, block, domain, addr_class);
   return 0;
 }
 
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index bcce435..8f0f858 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -67,7 +67,7 @@ struct objc_class {
 
 struct objc_super {
   CORE_ADDR receiver;
-  CORE_ADDR class;
+  CORE_ADDR objc_class;
 };
 
 struct objc_method {
@@ -854,7 +854,7 @@ parse_selector (char *method, char **selector)
 }
 
 static char * 
-parse_method (char *method, char *type, char **class, 
+parse_method (char *method, char *type, char **objc_class,
 	      char **category, char **selector)
 {
   char *s1 = NULL;
@@ -867,7 +867,7 @@ parse_method (char *method, char *type, char **class,
   char *nselector = NULL;
 
   gdb_assert (type != NULL);
-  gdb_assert (class != NULL);
+  gdb_assert (objc_class != NULL);
   gdb_assert (category != NULL);
   gdb_assert (selector != NULL);
   
@@ -939,8 +939,8 @@ parse_method (char *method, char *type, char **class,
 
   if (type != NULL)
     *type = ntype;
-  if (class != NULL)
-    *class = nclass;
+  if (objc_class != NULL)
+    *objc_class = nclass;
   if (category != NULL)
     *category = ncategory;
   if (selector != NULL)
@@ -950,7 +950,7 @@ parse_method (char *method, char *type, char **class,
 }
 
 static void
-find_methods (char type, const char *class, const char *category, 
+find_methods (char type, const char *objc_class, const char *category,
 	      const char *selector,
 	      VEC (const_char_ptr) **symbol_names)
 {
@@ -1016,8 +1016,8 @@ find_methods (char type, const char *class, const char *category,
 	  if ((type != '\0') && (ntype != type))
 	    continue;
 
-	  if ((class != NULL) 
-	      && ((nclass == NULL) || (strcmp (class, nclass) != 0)))
+	  if ((objc_class != NULL)
+	      && ((nclass == NULL) || (strcmp (objc_class, nclass) != 0)))
 	    continue;
 
 	  if ((category != NULL) && 
@@ -1105,7 +1105,7 @@ const char *
 find_imps (const char *method, VEC (const_char_ptr) **symbol_names)
 {
   char type = '\0';
-  char *class = NULL;
+  char *objc_class = NULL;
   char *category = NULL;
   char *selector = NULL;
 
@@ -1118,7 +1118,7 @@ find_imps (const char *method, VEC (const_char_ptr) **symbol_names)
 
   buf = (char *) alloca (strlen (method) + 1);
   strcpy (buf, method);
-  tmp = parse_method (buf, &type, &class, &category, &selector);
+  tmp = parse_method (buf, &type, &objc_class, &category, &selector);
 
   if (tmp == NULL)
     {
@@ -1131,7 +1131,7 @@ find_imps (const char *method, VEC (const_char_ptr) **symbol_names)
       selector_case = 1;
     }
 
-  find_methods (type, class, category, selector, symbol_names);
+  find_methods (type, objc_class, category, selector, symbol_names);
 
   /* If we hit the "selector" case, and we found some methods, then
      add the selector itself as a symbol, if it exists.  */
@@ -1411,34 +1411,36 @@ read_objc_super (struct gdbarch *gdbarch, CORE_ADDR addr,
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
   super->receiver = read_memory_unsigned_integer (addr, 4, byte_order);
-  super->class = read_memory_unsigned_integer (addr + 4, 4, byte_order);
+  super->objc_class = read_memory_unsigned_integer (addr + 4, 4, byte_order);
 };
 
 static void 
 read_objc_class (struct gdbarch *gdbarch, CORE_ADDR addr,
-		 struct objc_class *class)
+		 struct objc_class *objc_class)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
-  class->isa = read_memory_unsigned_integer (addr, 4, byte_order);
-  class->super_class = read_memory_unsigned_integer (addr + 4, 4, byte_order);
-  class->name = read_memory_unsigned_integer (addr + 8, 4, byte_order);
-  class->version = read_memory_unsigned_integer (addr + 12, 4, byte_order);
-  class->info = read_memory_unsigned_integer (addr + 16, 4, byte_order);
-  class->instance_size = read_memory_unsigned_integer (addr + 18, 4,
+  objc_class->isa = read_memory_unsigned_integer (addr, 4, byte_order);
+  objc_class->super_class = read_memory_unsigned_integer (addr + 4, 4,
+						       byte_order);
+  objc_class->name = read_memory_unsigned_integer (addr + 8, 4, byte_order);
+  objc_class->version = read_memory_unsigned_integer (addr + 12, 4, byte_order);
+  objc_class->info = read_memory_unsigned_integer (addr + 16, 4, byte_order);
+  objc_class->instance_size = read_memory_unsigned_integer (addr + 18, 4,
+						       byte_order);
+  objc_class->ivars = read_memory_unsigned_integer (addr + 24, 4, byte_order);
+  objc_class->methods = read_memory_unsigned_integer (addr + 28, 4, byte_order);
+  objc_class->cache = read_memory_unsigned_integer (addr + 32, 4, byte_order);
+  objc_class->protocols = read_memory_unsigned_integer (addr + 36, 4,
 						       byte_order);
-  class->ivars = read_memory_unsigned_integer (addr + 24, 4, byte_order);
-  class->methods = read_memory_unsigned_integer (addr + 28, 4, byte_order);
-  class->cache = read_memory_unsigned_integer (addr + 32, 4, byte_order);
-  class->protocols = read_memory_unsigned_integer (addr + 36, 4, byte_order);
 }
 
 static CORE_ADDR
 find_implementation_from_class (struct gdbarch *gdbarch,
-				CORE_ADDR class, CORE_ADDR sel)
+				CORE_ADDR objc_class, CORE_ADDR sel)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR subclass = class;
+  CORE_ADDR subclass = objc_class;
 
   while (subclass != 0) 
     {
@@ -1562,10 +1564,10 @@ resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc)
   sel = gdbarch_fetch_pointer_argument (gdbarch, frame, 1, ptr_type);
 
   read_objc_super (gdbarch, super, &sstr);
-  if (sstr.class == 0)
+  if (sstr.objc_class == 0)
     return 0;
   
-  res = find_implementation_from_class (gdbarch, sstr.class, sel);
+  res = find_implementation_from_class (gdbarch, sstr.objc_class, sel);
   if (new_pc != 0)
     *new_pc = res;
   if (res == 0)
@@ -1590,10 +1592,10 @@ resolve_msgsend_super_stret (CORE_ADDR pc, CORE_ADDR *new_pc)
   sel = gdbarch_fetch_pointer_argument (gdbarch, frame, 2, ptr_type);
 
   read_objc_super (gdbarch, super, &sstr);
-  if (sstr.class == 0)
+  if (sstr.objc_class == 0)
     return 0;
   
-  res = find_implementation_from_class (gdbarch, sstr.class, sel);
+  res = find_implementation_from_class (gdbarch, sstr.objc_class, sel);
   if (new_pc != 0)
     *new_pc = res;
   if (res == 0)
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index ed022ad..55eecf1 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -105,7 +105,7 @@ struct objc_class_str
   {
     struct stoken stoken;
     struct type *type;
-    int class;
+    int objc_class;
   };
 
 typedef struct type *type_ptr;
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 8eac5e1..d9dc3e9 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1496,12 +1496,12 @@ psymbol_hash (const void *addr, int length)
   struct partial_symbol *psymbol = (struct partial_symbol *) addr;
   unsigned int lang = psymbol->ginfo.language;
   unsigned int domain = PSYMBOL_DOMAIN (psymbol);
-  unsigned int class = PSYMBOL_CLASS (psymbol);
+  unsigned int addr_class = PSYMBOL_CLASS (psymbol);
 
   h = hash_continue (&psymbol->ginfo.value, sizeof (psymbol->ginfo.value), h);
   h = hash_continue (&lang, sizeof (unsigned int), h);
   h = hash_continue (&domain, sizeof (unsigned int), h);
-  h = hash_continue (&class, sizeof (unsigned int), h);
+  h = hash_continue (&addr_class, sizeof (unsigned int), h);
   h = hash_continue (psymbol->ginfo.name, strlen (psymbol->ginfo.name), h);
 
   return h;
@@ -1579,7 +1579,7 @@ psymbol_bcache_full (struct partial_symbol *sym,
 static const struct partial_symbol *
 add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
 		       domain_enum domain,
-		       enum address_class class,
+		       enum address_class addr_class,
 		       long val,	/* Value as a long */
 		       CORE_ADDR coreaddr,	/* Value as a CORE_ADDR */
 		       enum language language, struct objfile *objfile,
@@ -1604,7 +1604,7 @@ add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
   SYMBOL_SECTION (&psymbol) = -1;
   SYMBOL_SET_LANGUAGE (&psymbol, language, &objfile->objfile_obstack);
   PSYMBOL_DOMAIN (&psymbol) = domain;
-  PSYMBOL_CLASS (&psymbol) = class;
+  PSYMBOL_CLASS (&psymbol) = addr_class;
 
   SYMBOL_SET_NAMES (&psymbol, name, namelength, copy_name, objfile);
 
@@ -1664,7 +1664,7 @@ append_psymbol_to_list (struct psymbol_allocation_list *list,
 void
 add_psymbol_to_list (const char *name, int namelength, int copy_name,
 		     domain_enum domain,
-		     enum address_class class,
+		     enum address_class addr_class,
 		     struct psymbol_allocation_list *list, 
 		     long val,	/* Value as a long */
 		     CORE_ADDR coreaddr,	/* Value as a CORE_ADDR */
@@ -1675,7 +1675,7 @@ add_psymbol_to_list (const char *name, int namelength, int copy_name,
   int added;
 
   /* Stash the partial symbol away in the cache.  */
-  psym = add_psymbol_to_bcache (name, namelength, copy_name, domain, class,
+  psym = add_psymbol_to_bcache (name, namelength, copy_name, domain, addr_class,
 				val, coreaddr, language, objfile, &added);
 
   /* Do not duplicate global partial symbols.  */
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 8afe52d..5877bf6 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -145,42 +145,45 @@ static PyObject *
 sympy_is_constant (PyObject *self, void *closure)
 {
   struct symbol *symbol = NULL;
-  enum address_class class;
+  enum address_class addr_class;
 
   SYMPY_REQUIRE_VALID (self, symbol);
 
-  class = SYMBOL_CLASS (symbol);
+  addr_class = SYMBOL_CLASS (symbol);
 
-  return PyBool_FromLong (class == LOC_CONST || class == LOC_CONST_BYTES);
+  return PyBool_FromLong (addr_class == LOC_CONST
+			  || addr_class == LOC_CONST_BYTES);
 }
 
 static PyObject *
 sympy_is_function (PyObject *self, void *closure)
 {
   struct symbol *symbol = NULL;
-  enum address_class class;
+  enum address_class addr_class;
 
   SYMPY_REQUIRE_VALID (self, symbol);
 
-  class = SYMBOL_CLASS (symbol);
+  addr_class = SYMBOL_CLASS (symbol);
 
-  return PyBool_FromLong (class == LOC_BLOCK);
+  return PyBool_FromLong (addr_class == LOC_BLOCK);
 }
 
 static PyObject *
 sympy_is_variable (PyObject *self, void *closure)
 {
   struct symbol *symbol = NULL;
-  enum address_class class;
+  enum address_class addr_class;
 
   SYMPY_REQUIRE_VALID (self, symbol);
 
-  class = SYMBOL_CLASS (symbol);
+  addr_class = SYMBOL_CLASS (symbol);
 
   return PyBool_FromLong (!SYMBOL_IS_ARGUMENT (symbol)
-			  && (class == LOC_LOCAL || class == LOC_REGISTER
-			      || class == LOC_STATIC || class == LOC_COMPUTED
-			      || class == LOC_OPTIMIZED_OUT));
+			  && (addr_class == LOC_LOCAL
+			      || addr_class == LOC_REGISTER
+			      || addr_class == LOC_STATIC
+			      || addr_class == LOC_COMPUTED
+			      || addr_class == LOC_OPTIMIZED_OUT));
 }
 
 /* Implementation of gdb.Symbol.needs_frame -> Boolean.
diff --git a/gdb/top.c b/gdb/top.c
index c473d8c..8b360ee 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -453,7 +453,7 @@ execute_command (char *p, int from_tty)
 	deprecated_cmd_warning (line);
 
       /* c->user_commands would be NULL in the case of a python command.  */
-      if (c->class == class_user && c->user_commands)
+      if (c->cmd_class == class_user && c->user_commands)
 	execute_user_command (c, arg);
       else if (c->type == set_cmd)
 	do_set_command (arg, from_tty, c);
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]