Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: Jim Blandy <jimb@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFA/RFC] Address class support
Date: Wed, 11 Dec 2002 12:32:00 -0000	[thread overview]
Message-ID: <1021211202253.ZM19631@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@redhat.com> "Re: [PATCH RFA/RFC] Address class support" (Oct 21,  7:49pm)

On Oct 21,  7:49pm, Andrew Cagney wrote:

> > +F:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:char *:address_class_type_flags_to_name:int type_flags:type_flags
> Is it possible to ``const char *'' propogate this 
> (address_space_int_to_name()) would need to be changed?

Yes.  I've just committed the patch below.

	* 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.

Index: c-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-typeprint.c,v
retrieving revision 1.23
diff -u -p -r1.23 c-typeprint.c
--- c-typeprint.c	14 Oct 2002 22:58:28 -0000	1.23
+++ c-typeprint.c	11 Dec 2002 20:13:08 -0000
@@ -300,7 +300,7 @@ c_type_print_modifier (struct type *type
 		       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: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.184
diff -u -p -r1.184 gdbarch.sh
--- gdbarch.sh	11 Dec 2002 02:26:35 -0000	1.184
+++ gdbarch.sh	11 Dec 2002 20:13:10 -0000
@@ -676,8 +676,8 @@ v::NAME_OF_MALLOC:const char *:name_of_m
 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: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.62
diff -u -p -r1.62 gdbtypes.c
--- gdbtypes.c	25 Oct 2002 22:25:55 -0000	1.62
+++ gdbtypes.c	11 Dec 2002 20:13:11 -0000
@@ -416,7 +416,7 @@ address_space_name_to_int (char *space_i
 /* 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: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.38
diff -u -p -r1.38 gdbtypes.h
--- gdbtypes.h	11 Nov 2002 00:55:34 -0000	1.38
+++ gdbtypes.h	11 Dec 2002 20:13:11 -0000
@@ -1096,7 +1096,7 @@ extern void replace_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);


  parent reply	other threads:[~2002-12-11 20:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 17:42 Kevin Buettner
2002-10-16  0:24 ` Jim Blandy
2002-10-16 23:39   ` Eli Zaretskii
2002-10-17 11:15     ` Kevin Buettner
2002-10-16 11:42 ` Kevin Buettner
2002-10-16 23:39   ` Eli Zaretskii
     [not found]     ` <eliz@is.elta.co.il>
2002-10-17 12:23       ` Kevin Buettner
2002-10-16 13:57 ` Kevin Buettner
2002-10-21 16:49 ` Andrew Cagney
2002-11-27 20:32   ` Andrew Cagney
2002-12-02  6:52     ` Kevin Buettner
2002-12-09 15:42   ` Kevin Buettner
2002-12-11 12:32   ` Kevin Buettner [this message]
2002-10-22  7:10 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1021211202253.ZM19631@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox