From: Doug Evans <dje@google.com>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFC] While processing a struct die, store the method's address in its fn_field
Date: Wed, 26 Nov 2014 05:19:00 -0000 [thread overview]
Message-ID: <CADPb22QoCwpqxDf2LfAch7wmeGmdXwfUxLUOOTdCNU3hi88pdg@mail.gmail.com> (raw)
In-Reply-To: <CAGyQ6gxuX3L8=ukyCrfPeCHTYFsEUD4eymFnpbveTYPeuAzfOw@mail.gmail.com>
On Tue, Nov 25, 2014 at 7:58 PM, Siva Chandra <sivachandra@google.com> wrote:
> I will go over your comments in detail and respond. One clarification
> until then ...
>
> On Tue, Nov 25, 2014 at 7:22 PM, Doug Evans <dje@google.com> wrote:
>> btw, when I try your patch I get one fail:
>>
>> p lambda(10)^M
>> Invalid data type for function to be called.^M
>> (gdb) FAIL: gdb.dwarf2/dw2-member-function-addr.exp: p lambda()
>
> As mentioned in my very first email, the tests depend on
> https://sourceware.org/ml/gdb-patches/2014-11/msg00479.html. We can
> remove this dependency by invoking the operator() explicitly
> "lambda.operator()(10)".
Ah righto.
Digging a bit deeper, I see the lookup_symbol call in value_fn_field
gets passed NULL for block.
That means that lookup_local_symbol won't do anything, but what we're
looking for (as can be seen in the symbol dump) is not in STATIC_BLOCK
(block #001) nor GLOBAL_BLOCK (block #000).
If I manually hack the value passed to lookup_symbol to be a block with
__lambda0::operator()(int) const,
and disable your patch, then "p lambda(5)" works.
So I think we need to figure out how to pass a usable value for block
to lookup_symbol in value_fn_field. Also, I wouldn't preclude a gcc
bug here and/or a bug in dwarf2read.c where the lambda should have
been in a different block than the one it was put in.
next prev parent reply other threads:[~2014-11-26 5:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 15:55 Siva Chandra
2014-11-24 20:22 ` Doug Evans
2014-11-24 20:28 ` Doug Evans
2014-11-26 4:36 ` Doug Evans
2014-11-26 4:46 ` Siva Chandra
2014-11-26 5:05 ` Doug Evans
2014-11-25 15:00 ` Siva Chandra
2014-11-25 22:10 ` Doug Evans
2014-11-25 23:37 ` Siva Chandra
2014-11-26 3:22 ` Doug Evans
2014-11-26 3:58 ` Siva Chandra
2014-11-26 5:19 ` Doug Evans [this message]
2014-11-26 7:31 ` Siva Chandra
2014-11-26 21:11 ` Doug Evans
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=CADPb22QoCwpqxDf2LfAch7wmeGmdXwfUxLUOOTdCNU3hi88pdg@mail.gmail.com \
--to=dje@google.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