This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 PR gdb/16841] virtual inheritance via typedef cannot find base
- From: Tom Tromey <tom at tromey dot com>
- To: Weimin Pan <weimin dot pan at oracle dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Thu, 04 Oct 2018 16:19:58 -0600
- Subject: Re: [PATCH v3 PR gdb/16841] virtual inheritance via typedef cannot find base
- References: <1536800471-78975-1-git-send-email-weimin.pan@oracle.com> <87r2hrt3s6.fsf@tromey.com> <8c8e0eb6-245c-40c0-456e-9f49ccb92b74@oracle.com>
Sorry, I forgot about this.
Tom> The code has a loop to deal with multiple inheritance but the test
Tom> doesn't exercise this case. I think an additional for that would be
Tom> good.
Weimin> Sorry, which case is not exercised? Could it be printing superbase
Weimin> class member in base?
There's this loop in get_baseclass_offset:
+ for (int i = 0; i < TYPE_N_BASECLASSES (vt); i++)
However, all the classes in virtbase2.cc use single inheritance, so when
testing, the loop only loops once. I think it would be good to test a
multiple inheritance case.
Tom