From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26451 invoked by alias); 11 Dec 2002 20:23:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26443 invoked from network); 11 Dec 2002 20:23:05 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 11 Dec 2002 20:23:05 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gBBJvPP04011 for ; Wed, 11 Dec 2002 14:57:25 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gBBKMxD02371; Wed, 11 Dec 2002 15:22:59 -0500 Received: from localhost.localdomain (vpn50-3.rdu.redhat.com [172.16.50.3]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gBBKMxY24680; Wed, 11 Dec 2002 15:22:59 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id gBBKMr019632; Wed, 11 Dec 2002 13:22:53 -0700 Date: Wed, 11 Dec 2002 12:32:00 -0000 From: Kevin Buettner Message-Id: <1021211202253.ZM19631@localhost.localdomain> In-Reply-To: Andrew Cagney "Re: [PATCH RFA/RFC] Address class support" (Oct 21, 7:49pm) References: <1021016004200.ZM22063@localhost.localdomain> <3DB49284.5040700@redhat.com> To: Andrew Cagney Subject: Re: [PATCH RFA/RFC] Address class support Cc: Jim Blandy , gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00365.txt.bz2 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);