Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@ges.redhat.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: gdb-patches@sources.redhat.com, kevinb@redhat.com,
	cagney@redhat.com, Elena Zannoni <ezannoni@redhat.com>
Subject: Re: [RFC] fixing extract_struct_value_address
Date: Thu, 22 Aug 2002 13:04:00 -0000	[thread overview]
Message-ID: <3D653776.10407@ges.redhat.com> (raw)
In-Reply-To: <3D652594.3424CD7D@redhat.com>

> I get the feeling that all that is needed is for the above to be enabled
>> for all targets.
>> 
>> enjoy,
>> Andrew
> 
> 
> Wouldn't that only work for targets that return the value on the stack?
> Those targets already work properly (I think the 386 is one).
> I'm concerned here with targets where the struct is returned
> by reference (thru a pointer provided by the caller.)

See:

/* elz: I defined this new macro for the hppa architecture only.
    this gives us a way to get the value returned by the function from 
the stack,
    at the same address we told the function to put it.
    We cannot assume on the pa that r28 still contains the address of 
the returned
    structure. Usually this will be overwritten by the callee.
    I don't know about other architectures, so I defined this macro
  */

The comment appears to describe a situtation identical to yours.

As for the more generic problem, per:

> Discussed before in:
> 
> http://sources.redhat.com/ml/gdb-patches/2001-11/msg00571.html
> and
> http://sources.redhat.com/ml/gdb-patches/2001-12/msg00325.html
> 
> never resolved.
> 
> Elena

My understanding is that, for some ABIs, it just isn't possible to find 
the address of the returned value (unless debug info (cfi?) somehow 
helps).  For such cases, I think EXTRACT_STRUCT_VALUE_ADDRESS() should 
return zero.

enjoy,
Andrew



      reply	other threads:[~2002-08-22 19:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-21 16:05 Michael Snyder
2002-08-21 18:32 ` Daniel Jacobowitz
2002-08-21 19:04   ` Michael Snyder
2002-08-21 22:43 ` Jim Blandy
2002-08-22 11:12   ` Michael Snyder
2002-08-22 11:39     ` Andrew Cagney
2002-08-22  8:38 ` Andrew Cagney
2002-08-22 10:08   ` Elena Zannoni
2002-08-22 11:17   ` Michael Snyder
2002-08-22 13:04     ` Andrew Cagney [this message]

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=3D653776.10407@ges.redhat.com \
    --to=ac131313@ges.redhat.com \
    --cc=cagney@redhat.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@redhat.com \
    --cc=msnyder@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