Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: Jim Blandy <jimb@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] [4/5] Use DWARF-2 DW_AT_artificial information
Date: Thu, 16 May 2002 21:09:00 -0000	[thread overview]
Message-ID: <20020517040923.GB19263@nevyn.them.org> (raw)
In-Reply-To: <15588.17930.984005.87068@localhost.redhat.com>

On Thu, May 16, 2002 at 07:51:38PM -0400, Elena Zannoni wrote:
> Jim Blandy writes:
>  > 
>  > Possibly clueless suggestion:
>  > 
> 
> I think this is where Daniel was headed, he's the one that added that
> 'artificial' member. Except he ran into an HP merge roadblock.

You're thinking too highly of me, but now that you mention it it's a
really good idea... I will investigate the practicality of this.  I
believe it would be a memory increase from where we are now, since we'd
allocate a struct field for every argument, but that's not necessarily
a bad thing.  The simplicity is more important.




> 
> Elena
> 
> 
>  > Couldn't we represent a method's arguments the same way we represent a
>  > function's arguments?  That is, nfields would carry the number of
>  > arguments, and fields[i] would describe the n'th field.  We could use
>  > the `artificial' member of `union field_location' in `struct field' to
>  > hold the information conveyed by DW_AT_artificial.
>  > 
>  > The fact that we've distinguished these has caused problems in the
>  > past.  Check out the following code in hand_function_call:
>  > 
>  >   for (i = nargs - 1; i >= 0; i--)
>  >     {
>  >       /* Assume that methods are always prototyped, unless they are off the
>  > 	 end (which we should only be allowing if there is a ``...'').  
>  >          FIXME.  */
>  >       if (TYPE_CODE (ftype) == TYPE_CODE_METHOD)
>  > 	{
>  > 	  if (i < n_method_args)
>  > 	    args[i] = value_arg_coerce (args[i], TYPE_ARG_TYPES (ftype)[i], 1);
>  > 	  else
>  > 	    args[i] = value_arg_coerce (args[i], NULL, 0);
>  > 	}
>  > 
>  >       /* If we're off the end of the known arguments, do the standard
>  >          promotions.  FIXME: if we had a prototype, this should only
>  >          be allowed if ... were present.  */
>  >       if (i >= TYPE_NFIELDS (ftype))
>  > 	args[i] = value_arg_coerce (args[i], NULL, 0);
>  > 
>  >       else
>  > 	{
>  > 	  param_type = TYPE_FIELD_TYPE (ftype, i);
>  > 	  args[i] = value_arg_coerce (args[i], param_type, TYPE_PROTOTYPED (ftype));
>  > 	}
>  > 
>  > Those two loops could be re-collapsed into one.
> 

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2002-05-17  4:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-15 12:31 Daniel Jacobowitz
2002-03-07 12:43 ` Daniel Jacobowitz
2002-03-07 12:55   ` Elena Zannoni
2002-05-14 14:13   ` Daniel Jacobowitz
2002-05-14 21:36     ` Elena Zannoni
2002-05-14 21:52       ` Daniel Jacobowitz
2002-05-15 11:16         ` Elena Zannoni
2002-05-15 11:51           ` Daniel Jacobowitz
2002-05-16 15:33             ` Jim Blandy
2002-05-16 16:53               ` Elena Zannoni
2002-05-16 17:24                 ` Andrew Cagney
2002-05-17 10:45                   ` Michael Snyder
2002-05-17 11:00                     ` Elena Zannoni
2002-05-16 21:09                 ` Daniel Jacobowitz [this message]
2002-05-14 22:06 Michael Elizabeth Chastain

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=20020517040923.GB19263@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ezannoni@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