aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2002-12-11 20:19:39 +0000
committerKevin Buettner <kevinb@redhat.com>2002-12-11 20:19:39 +0000
commit321432c0c6c6849c0e924f65422fe4a92b1b6907 (patch)
tree63db1c1b6dd16fb6ff62189a8200f03dfdb3aecd /gdb
parenta23b6e6a0ad4098759968bf2c666357d5dd08c22 (diff)
downloadgdb-321432c0c6c6849c0e924f65422fe4a92b1b6907.zip
gdb-321432c0c6c6849c0e924f65422fe4a92b1b6907.tar.gz
gdb-321432c0c6c6849c0e924f65422fe4a92b1b6907.tar.bz2
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/c-typeprint.c2
-rw-r--r--gdb/gdbarch.c4
-rw-r--r--gdb/gdbarch.h8
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/gdbtypes.c2
-rw-r--r--gdb/gdbtypes.h2
7 files changed, 22 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2643d4a..0d263ac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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".
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 6c5e815..fa4683a 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -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,
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 03a4ae3..938d9fa 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -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)
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index b8ad9a0..0b2381f9 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -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 */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 8458ae3..e2da438 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -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
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index c9cae4c..293adda 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -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;
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index fe4b0f1..69f8cdb 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -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);