Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: Andrew Cagney <ac131313@redhat.com>,
	gdb-patches@sources.redhat.com, Jim Blandy <jimb@redhat.com>
Subject: Re: [PATCH RFA/RFC] Address class support
Date: Wed, 27 Nov 2002 20:32:00 -0000	[thread overview]
Message-ID: <3DE59C41.4010607@redhat.com> (raw)
In-Reply-To: <3DB49284.5040700@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 56 bytes --]

Kevin,

Did you get a chance to follow this up?

Andrew

[-- Attachment #2: mailbox-message://ac131313@movemail/fsf/gdb/patches#3698285 --]
[-- Type: message/rfc822, Size: 5995 bytes --]

From: Andrew Cagney <ac131313@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com, Jim Blandy <jimb@redhat.com>
Subject: Re: [PATCH RFA/RFC] Address class support
Date: Mon, 21 Oct 2002 19:49:24 -0400
Message-ID: <3DB49284.5040700@redhat.com>


> 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




  reply	other threads:[~2002-11-28  4:32 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 [this message]
2002-12-02  6:52     ` Kevin Buettner
2002-12-09 15:42   ` Kevin Buettner
2002-12-11 12:32   ` Kevin Buettner
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=3DE59C41.4010607@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.com \
    --cc=kevinb@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