Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Funky code in gnuv2_virtual_fn_field
@ 2001-05-20 13:06 Jim Blandy
  2001-05-21 18:01 ` Daniel Berlin
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2001-05-20 13:06 UTC (permalink / raw)
  To: Daniel Berlin; +Cc: gdb

I'm looking at lines 112--118 in gnu-v2-abi.c:

  if (TYPE_TARGET_TYPE (context) != type1)
    {
      value_ptr tmp = value_cast (context, value_addr (arg1));
      VALUE_POINTED_TO_OFFSET (tmp) = 0;
      arg1 = value_ind (tmp);
      type1 = check_typedef (VALUE_TYPE (arg1));
    }

This looks fishy to me.  If we smash the POINTED_TO_OFFSET without
smashing the ENCLOSING_TYPE in a corresponding manner, and then we
indirect through that pointer, don't we get a value whose
ENCLOSING_TYPE is set, but whose address points to the embedded
object, and not the enclosing object?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-05-23 21:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-20 13:06 Funky code in gnuv2_virtual_fn_field Jim Blandy
2001-05-21 18:01 ` Daniel Berlin
2001-05-22 14:16   ` RFA: " Jim Blandy
2001-05-23 21:24     ` Daniel Berlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox