From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23792 invoked by alias); 28 Nov 2002 04:32:11 -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 23779 invoked from network); 28 Nov 2002 04:32:06 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 28 Nov 2002 04:32:06 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 1D0373F30; Wed, 27 Nov 2002 23:32:01 -0500 (EST) Message-ID: <3DE59C41.4010607@redhat.com> Date: Wed, 27 Nov 2002 20:32:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: Andrew Cagney , gdb-patches@sources.redhat.com, Jim Blandy Subject: Re: [PATCH RFA/RFC] Address class support References: <1021016004200.ZM22063@localhost.localdomain> <3DB49284.5040700@redhat.com> Content-Type: multipart/mixed; boundary="------------020302090001020508070807" X-SW-Source: 2002-11/txt/msg00701.txt.bz2 This is a multi-part message in MIME format. --------------020302090001020508070807 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 56 Kevin, Did you get a chance to follow this up? Andrew --------------020302090001020508070807 Content-Type: message/rfc822; name="mailbox-message://ac131313@movemail/fsf/gdb/patches#3698285" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mailbox-message://ac131313@movemail/fsf/gdb/patches#3698285" Content-length: 5974 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: ac131313@localhost.redhat.com Received: from localhost (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 85B633E12 for ; Mon, 21 Oct 2002 19:53:00 -0400 (EDT) Envelope-to: cagney@gnu.org Delivery-date: Mon, 21 Oct 2002 19:49:39 -0400 Received: from fencepost.gnu.org by localhost with IMAP (fetchmail-5.9.13) for ac131313@localhost (single-drop); Mon, 21 Oct 2002 19:53:00 -0400 (EDT) Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.10) id 183mIl-0005nE-01 for cagney@gnu.org; Mon, 21 Oct 2002 19:49:39 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 183mIg-0002hb-00 for cagney@gnu.org; Mon, 21 Oct 2002 19:49:35 -0400 Received: from sources.redhat.com ([209.249.29.67]) by monty-python.gnu.org with smtp (Exim 4.10) id 183mIf-0002hT-00 for cagney@gnu.org; Mon, 21 Oct 2002 19:49:33 -0400 Received: (qmail 9474 invoked by alias); 21 Oct 2002 23:49:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Delivered-To: mailing list gdb-patches@sources.redhat.com Received: (qmail 9458 invoked from network); 21 Oct 2002 23:49:25 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 21 Oct 2002 23:49:25 -0000 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 407D1800084; Mon, 21 Oct 2002 19:49:25 -0400 (EDT) Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 572243E12; Mon, 21 Oct 2002 19:49:24 -0400 (EDT) Message-ID: <3DB49284.5040700@redhat.com> Date: Mon, 21 Oct 2002 19:49:24 -0400 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: gdb-patches@sources.redhat.com, Jim Blandy Subject: Re: [PATCH RFA/RFC] Address class support References: <1021016004200.ZM22063@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-4.3 required=5.0 tests=FROM_ENDS_IN_NUMS,QUOTED_EMAIL_TEXT,REFERENCES, SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MOZILLA_UA, X_ACCEPT_LANG version=2.41 X-Spam-Level: Content-length: 3012 > Index: dwarf2read.c > =================================================================== > RCS file: /cvs/src/src/gdb/dwarf2read.c,v > retrieving revision 1.68 > diff -u -p -r1.68 dwarf2read.c > --- dwarf2read.c 9 Oct 2002 04:43:49 -0000 1.68 > +++ dwarf2read.c 16 Oct 2002 00:15:07 -0000 > @@ -683,6 +683,10 @@ static struct complaint dwarf2_invalid_a > { > "invalid attribute class or form for '%s' in '%s'", 0, 0 > }; > +static struct complaint dwarf2_invalid_pointer_size = > +{ > + "invalid pointer size %d", 0, 0 > +}; Please use the new complaint() interface. > +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? > +F:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:char *name, int *type_flags_ptr:name, type_flags_ptr > EOF > } > > Index: gdbtypes.c > =================================================================== > RCS file: /cvs/src/src/gdb/gdbtypes.c,v > retrieving revision 1.59 > diff -u -p -r1.59 gdbtypes.c > --- gdbtypes.c 2 Oct 2002 22:01:53 -0000 1.59 > +++ gdbtypes.c 16 Oct 2002 00:15:10 -0000 > @@ -397,11 +397,15 @@ lookup_function_type (struct type *type) > extern int > address_space_name_to_int (char *space_identifier) > { > + int type_flags; > /* Check for known address space delimiters. */ > if (!strcmp (space_identifier, "code")) > return TYPE_FLAG_CODE_SPACE; > else if (!strcmp (space_identifier, "data")) > return TYPE_FLAG_DATA_SPACE; > + else if (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P () > + && ADDRESS_CLASS_NAME_TO_TYPE_FLAGS (space_identifier, &type_flags)) > + return type_flags; > else > error ("Unknown address space specifier: \"%s\"", space_identifier); > } > @@ -416,6 +420,9 @@ address_space_int_to_name (int space_fla > return "code"; > else if (space_flag & TYPE_FLAG_DATA_SPACE) > return "data"; > + else if ((space_flag & TYPE_FLAG_ADDRESS_CLASS_ALL) > + && ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P ()) > + return ADDRESS_CLASS_TYPE_FLAGS_TO_NAME (space_flag); > else > return NULL; > } Is there a lurking bug here? Is something like: @short @data valid (I think so) yet, the above can only print one of those names. Similarly should something like: @code @data be rejected? Looking at the use of these functions. Everything is refering to ``address space'' vis: address_space_id = address_space_int_to_name (TYPE_INSTANCE_FLAGS (type)); if (address_space_id) { if (did_print_modifier || need_pre_space) fprintf_filtered (stream, " "); fprintf_filtered (stream, "@%s", address_space_id); did_print_modifier = 1; } yet with this patch, that is definitly no longer true! I think the calling code needs to be updated so that it uses a more meaningful name. How would code use this to add an ``@io'' pointer? Andrew --------------020302090001020508070807--