+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".
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,
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);
}
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)
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 */
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
/* 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;
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);