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

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.

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.


  reply	other threads:[~2002-05-16 23:53 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 [this message]
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
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=15588.17930.984005.87068@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=drow@mvista.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