From: Michael Snyder <msnyder@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Jim Blandy <jimb@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: RFA: tolerate unavailable struct return values
Date: Fri, 30 Nov 2001 13:51:00 -0000 [thread overview]
Message-ID: <3C07FF91.239D7794@cygnus.com> (raw)
In-Reply-To: <20011130163218.A29232@nevyn.them.org>
Daniel Jacobowitz wrote:
>
> On Fri, Nov 30, 2001 at 03:49:52PM -0500, Jim Blandy wrote:
> >
> > Daniel Jacobowitz <drow@mvista.com> writes:
> > > On Thu, Nov 29, 2001 at 05:09:13PM -0500, Jim Blandy wrote:
> > > >
> > > > On some architectures, it's impossible for GDB to find structs
> > > > returned by value. These shouldn't be failures. Should they be
> > > > passes?
> > >
> > > Out of curiousity, which architectures? And to be pedantic, I suspect
> > > that it might be "not always possible" rather than actually
> > > impossible.
> >
> > The one I have in mind is the S/390, although I'm pretty sure there
> > are others. I've included the bug report I sent to the S/390 GCC
> > maintainers below.
> >
> > One approach would be to hope that the return buffer's address was
> > still there in the register it was passed in. But there's no way to
> > tell when you're wrong. GDB will just print garbage, and the user
> > will think their program is wrong. Better to simply say, "I can't
> > find this information reliably", and let the user, who knows their
> > program, find another way to get the info --- setting a breakpoint on
> > the return statement, or looking at where the caller put the
> > structure.
>
> Hmmmm. I wonder if MIPS could ever be affected by this? I don't think
> the MIPS ABI specifies that $a0 remains live. It looks as if the value
> of $a0 is always returned in $v0 in such functions, though.
It's not an uncommon problem, and I imagine we get it wrong a lot of the time.
WARNING: multiple messages have this Message-ID
From: Michael Snyder <msnyder@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Jim Blandy <jimb@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: RFA: tolerate unavailable struct return values
Date: Sat, 24 Nov 2001 23:01:00 -0000 [thread overview]
Message-ID: <3C07FF91.239D7794@cygnus.com> (raw)
Message-ID: <20011124230100.2XkLd-E4GqVQklyFwVpK7YWmYmGulET2JEC_uNL7RxA@z> (raw)
In-Reply-To: <20011130163218.A29232@nevyn.them.org>
Daniel Jacobowitz wrote:
>
> On Fri, Nov 30, 2001 at 03:49:52PM -0500, Jim Blandy wrote:
> >
> > Daniel Jacobowitz <drow@mvista.com> writes:
> > > On Thu, Nov 29, 2001 at 05:09:13PM -0500, Jim Blandy wrote:
> > > >
> > > > On some architectures, it's impossible for GDB to find structs
> > > > returned by value. These shouldn't be failures. Should they be
> > > > passes?
> > >
> > > Out of curiousity, which architectures? And to be pedantic, I suspect
> > > that it might be "not always possible" rather than actually
> > > impossible.
> >
> > The one I have in mind is the S/390, although I'm pretty sure there
> > are others. I've included the bug report I sent to the S/390 GCC
> > maintainers below.
> >
> > One approach would be to hope that the return buffer's address was
> > still there in the register it was passed in. But there's no way to
> > tell when you're wrong. GDB will just print garbage, and the user
> > will think their program is wrong. Better to simply say, "I can't
> > find this information reliably", and let the user, who knows their
> > program, find another way to get the info --- setting a breakpoint on
> > the return statement, or looking at where the caller put the
> > structure.
>
> Hmmmm. I wonder if MIPS could ever be affected by this? I don't think
> the MIPS ABI specifies that $a0 remains live. It looks as if the value
> of $a0 is always returned in $v0 in such functions, though.
It's not an uncommon problem, and I imagine we get it wrong a lot of the time.
next prev parent reply other threads:[~2001-11-30 13:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-19 20:48 Jim Blandy
2001-11-29 14:08 ` Jim Blandy
2001-11-29 14:19 ` Michael Snyder
2001-11-19 22:30 ` Michael Snyder
2001-11-29 14:37 ` Daniel Jacobowitz
2001-11-20 7:19 ` Daniel Jacobowitz
2001-11-30 12:48 ` Jim Blandy
2001-11-23 13:51 ` Jim Blandy
2001-11-30 13:33 ` Daniel Jacobowitz
2001-11-24 10:23 ` Daniel Jacobowitz
2001-11-30 13:51 ` Michael Snyder [this message]
2001-11-24 23:01 ` Michael Snyder
2001-12-12 11:27 ` Elena Zannoni
2001-12-17 15:09 ` Jim Blandy
2001-12-18 9:35 ` Elena Zannoni
[not found] ` <87667t2loj.fsf@creche.redhat.com>
2001-11-29 22:41 ` Jim Blandy
2001-11-21 8:07 ` Jim Blandy
2001-11-29 22:46 Jim Blandy
2001-11-21 13:10 ` Jim Blandy
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=3C07FF91.239D7794@cygnus.com \
--to=msnyder@cygnus.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@cygnus.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