From: sami wagiaalla <swagiaal@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch] smart pointer support
Date: Fri, 06 Aug 2010 16:23:00 -0000 [thread overview]
Message-ID: <4C5C36F1.9040800@redhat.com> (raw)
In-Reply-To: <201008052257.o75MvaE9031710@d12av02.megacenter.de.ibm.com>
On 08/05/2010 06:57 PM, Ulrich Weigand wrote:
> sami wagiaalla wrote:
>
>> * infcall.c (call_function_by_hand): Set VALUE_LVAL of the
>> returned value to lval_memory.
>
>
>> @@ -1026,6 +1026,7 @@ When the function is done executing, GDB will silently stop."),
>> retval = allocate_value (values_type);
>> gdbarch_return_value (gdbarch, value_type (function), values_type,
>> retbuf, value_contents_raw (retval), NULL);
>> + VALUE_LVAL (retval) = lval_memory;
>> break;
>
> This part looks broken. Setting VALUE_LVAL to lval_memory implies the
> value actually *has* location information pointing to memory, that is
> in particular, a memory address.
>
> Since this value doesn't have that information, and in general it may
> not even exist (function return values may be passed in registers), I
> don't see how this can be valid here.
>
Hmm I see. I was under the impression that here the value is copied from
the inferior's return location to gdb memory. As the patch stands (with
the kfail) this can be removed, but I am actually looking for guidance
on how to ensure that this value is available for gdb to perform further
function calls that utilize it, especially when the return value is a
copy not a reference. As is described in this bug:
http://sourceware.org/bugzilla/show_bug.cgi?id=11606
next prev parent reply other threads:[~2010-08-06 16:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 15:58 sami wagiaalla
2010-07-23 23:37 ` Tom Tromey
2010-08-05 18:46 ` sami wagiaalla
2010-08-05 22:57 ` Ulrich Weigand
2010-08-06 16:23 ` sami wagiaalla [this message]
2010-08-06 16:48 ` Ulrich Weigand
2010-08-06 17:29 ` Tom Tromey
2010-08-08 15:01 ` Ulrich Weigand
2010-08-06 21:33 ` sami wagiaalla
2010-08-06 22:20 ` Tom Tromey
2010-08-09 15:59 ` sami wagiaalla
2010-08-09 17:35 ` Tom Tromey
2010-08-09 18:04 ` sami wagiaalla
2010-08-09 18:23 ` Jan Kratochvil
2010-08-16 20:31 ` sami wagiaalla
2010-08-16 20:59 ` Pedro Alves
2010-08-17 16:16 ` sami wagiaalla
2010-08-17 17:15 ` Tom Tromey
2010-10-19 20:55 ` sami wagiaalla
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=4C5C36F1.9040800@redhat.com \
--to=swagiaal@redhat.com \
--cc=gdb-patches@sourceware.org \
/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