Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [3/3] unconditionally call via SYMBOL_COMPUTED_OPS
Date: Fri, 08 Feb 2013 11:52:00 -0000	[thread overview]
Message-ID: <87d2wbt445.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20130207163233.GA15297@host2.jankratochvil.net> (Jan	Kratochvil's message of "Thu, 7 Feb 2013 17:32:33 +0100")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> Without the full virtualization / unconditional calls via
Jan> SYMBOL_COMPUTED_OPS I do not understand this patch and I am against
Jan> it.

This was troubling me yesterday and I finally remembered that I did
implement the needed change, but in a non-obvious way.  I now think
either your analysis is incorrect or I didn't understand it.

Basically, it is register_symbol_alias_impl that does the work.
For a function, dwarf2_symbol_mark_computed uses the _block indices,
e.g.:

+      SYMBOL_ACLASS_INDEX (sym) = (is_block
+				   ? dwarf2_loclist_block_index
+				   : dwarf2_loclist_index);

These are registered as aliases of LOC_BLOCK:

+  dwarf2_loclist_block_index = register_symbol_alias_impl (LOC_BLOCK);

What this means is that the resulting symbol will have LOC_BLOCK and a
SYMBOL_LOCATION_BATON, but SYMBOL_COMPUTED_OPS will be NULL.  So, the
various calls via the vtable will never be taken.

Jan> I had problems cleaning up patch 2/2 now because issues brought in
Jan> by this patch 3/3 and I find this patch 3/3 is the inappropriate
Jan> one.

Ah, I see.  Your follow-on patch restored the vtable in all cases.
This isn't correct according to the approach of patch #3 and the design
implied by the comments and the PR.

I tend to like the approach taken in the patch because it is more
flexible.  If you disagree I would like to understand why.

Tom


  parent reply	other threads:[~2013-02-08 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 16:09 Tom Tromey
2013-02-07 16:32 ` Jan Kratochvil
2013-02-07 16:52   ` Tom Tromey
2013-02-07 17:03     ` Jan Kratochvil
2013-02-08 11:52   ` Tom Tromey [this message]
2013-02-08 18:27     ` Jan Kratochvil
2013-02-14 18:24       ` Tom Tromey
2013-03-20 18:40 ` Tom Tromey

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=87d2wbt445.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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