* gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME)
authorKevin Buettner <kevinb@redhat.com>
Wed, 11 Dec 2002 20:19:39 +0000 (20:19 +0000)
committerKevin Buettner <kevinb@redhat.com>
Wed, 11 Dec 2002 20:19:39 +0000 (20:19 +0000)
(ADDRESS_CLASS_NAME_TO_TYPE_FLAGS): Use ``const char *'' instead of
``char *'' for return and parameter types.
* gdbarch.h, gdbarch.c: Regenerate.
* gdbtypes.h, gdbtypes.c (address_space_int_to_name): Change
return type from ``char *'' to ``const char *''.
* c-typeprint.c (c_type_print_modifier): Make ``address_space_id''
const.

gdb/ChangeLog
gdb/c-typeprint.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbtypes.c
gdb/gdbtypes.h

index 2643d4a85375d0c97a0e4a47b5f7ed53dc061029..0d263aca6f57f9a75f89c1b076098f30a7f09592 100644 (file)
@@ -1,3 +1,14 @@
+2002-12-11  Kevin Buettner  <kevinb@redhat.com>
+
+       * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME)
+       (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS): Use ``const char *'' instead of
+       ``char *'' for return and parameter types.
+       * gdbarch.h, gdbarch.c: Regenerate.
+       * gdbtypes.h, gdbtypes.c (address_space_int_to_name): Change
+       return type from ``char *'' to ``const char *''.
+       * c-typeprint.c (c_type_print_modifier): Make ``address_space_id''
+       const.
+
 2002-12-11  Mark Kettenis  <kettenis@gnu.org>
 
        * i386-tdep.c: Include "dummy-frame.h".
index 6c5e815e2af2446df95e357b47812b97bfd9561b..fa4683a862637865338b6e37e579c547d1644b7c 100644 (file)
@@ -300,7 +300,7 @@ c_type_print_modifier (struct type *type, struct ui_file *stream,
                       int need_pre_space, int need_post_space)
 {
   int did_print_modifier = 0;
-  char *address_space_id;
+  const char *address_space_id;
 
   /* We don't print `const' qualifiers for references --- since all
      operators affect the thing referenced, not the reference itself,
index 03a4ae332661dbf55c7e5ebca969a55ccbe24e20..938d9faaed231c98f70d9ea915ae02d4234e4937 100644 (file)
@@ -5368,7 +5368,7 @@ gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
   return gdbarch->address_class_type_flags_to_name != 0;
 }
 
-char *
+const char *
 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
 {
   gdb_assert (gdbarch != NULL);
@@ -5395,7 +5395,7 @@ gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
 }
 
 int
-gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr)
+gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
 {
   gdb_assert (gdbarch != NULL);
   if (gdbarch->address_class_name_to_type_flags == 0)
index b8ad9a0e3b218105c775fd4b899d76fdc559ff9c..0b2381f9984fbf433d75af7e78dc2c2f49a8cc1c 100644 (file)
@@ -2762,14 +2762,14 @@ extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbar
 
 extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
 
-typedef char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
-extern char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
+typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
+extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
 extern void set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name);
 
 extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);
 
-typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, char *name, int *type_flags_ptr);
-extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr);
+typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
+extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
 extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags);
 
 /* Is a register in a group */
index 8458ae3c5e08754891b3e8dc8acbe03977133858..e2da438173bc2a9f677c65b5e14a8fe12a7d12d1 100755 (executable)
@@ -676,8 +676,8 @@ v::NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0:%s:NAME_OF
 v::CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
 v::HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0
 F:2:ADDRESS_CLASS_TYPE_FLAGS:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
-M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:char *:address_class_type_flags_to_name:int type_flags:type_flags:
-M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:char *name, int *type_flags_ptr:name, type_flags_ptr
+M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:const char *:address_class_type_flags_to_name:int type_flags:type_flags:
+M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr
 # Is a register in a group
 m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
 EOF
index c9cae4cda8dea919329cee7c2e65fd33736f97b2..293adda891fa46e9e0eeb399946d01b4ba4975ba 100644 (file)
@@ -416,7 +416,7 @@ address_space_name_to_int (char *space_identifier)
 /* Identify address space identifier by integer flag as defined in 
    gdbtypes.h -- return the string version of the adress space name. */
 
-extern char *
+const char *
 address_space_int_to_name (int space_flag)
 {
   struct gdbarch *gdbarch = current_gdbarch;
index fe4b0f12bdc7d7b0eecfdb7d51e8acd2e96924ef..69f8cdb3df4aaa4230f2145a4299a782ba7bfcf2 100644 (file)
@@ -1096,7 +1096,7 @@ extern void replace_type (struct type *, struct type *);
 
 extern int address_space_name_to_int (char *);
 
-extern char *address_space_int_to_name (int);
+extern const char *address_space_int_to_name (int);
 
 extern struct type *make_type_with_address_space (struct type *type, 
                                                  int space_identifier);