Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: sivachandra@google.com (Siva Chandra)
Cc: gdb-patches@sourceware.org (gdb-patches)
Subject: Re: [PATCH 0/2] Make chained function calls in expressions work
Date: Thu, 23 Oct 2014 16:09:00 -0000	[thread overview]
Message-ID: <201410231609.s9NG9ZvU004472@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <CAGyQ6gwpWzAWe01pUvd3Wgv1m1Yai-b3H2rw7Dq+3Hv_zca6pw@mail.gmail.com> from "Siva Chandra" at Oct 23, 2014 08:07:43 AM

Siva Chandra wrote:

> Restricting to just those values whose address is returned in a hidden
> param (per ABI) is OK, but an implementation detail made me to include
> all types of return values. There are two times when a return value's
> address is required:
> 
> 1. When a method is invoked on the return value: GDB has to evaluate
> the 'this' pointer. This is done in eval.c.

Ah, I knew there was something else I was missing :-)

In this case, I agree with the rest of your explanation.  Please add a
comment in the final version of the patch that explains why the extra
copy is necessary.

There's just one minor change I think would be good: can we allocate that
extra copy on the stack at least only for *class* types, then?  I'd prefer
to avoid this for the common case of routines just returning a scalar.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2014-10-23 16:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 13:29 Siva Chandra
2014-10-01  0:42 ` Siva Chandra
2014-10-01 13:15   ` Ulrich Weigand
2014-10-01 18:05     ` Siva Chandra
2014-10-01 18:26       ` Siva Chandra
2014-10-20 16:01         ` Ulrich Weigand
2014-10-20 19:56           ` Siva Chandra
2014-10-21 11:15             ` Ulrich Weigand
2014-10-21 20:30               ` Siva Chandra
2014-10-21 21:07                 ` Siva Chandra
2014-10-22 17:00                 ` Ulrich Weigand
2014-10-23 15:07                   ` Siva Chandra
2014-10-23 16:09                     ` Ulrich Weigand [this message]
2014-10-23 23:31                       ` Siva Chandra
2014-10-09  0:02   ` Siva Chandra
2014-10-15 13:43     ` Siva Chandra

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=201410231609.s9NG9ZvU004472@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.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