RFR: 8263834: Work around gdb <incomplete type> for HashtableEntry

Thomas Schatzl tschatzl at openjdk.java.net
Fri Mar 19 09:46:37 UTC 2021


On Fri, 19 Mar 2021 03:20:21 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> Please review this one liner to work around a gdb bug in printing subtypes of `HashtableEntry`:
> 
> (gdb) p this
> $1 = (const PlaceholderEntry * const) 0x7ffff0242a30
> (gdb) p *this
> $2 = <incomplete type>
> (gdb) ptype this
> type = const class PlaceholderEntry {
>     <incomplete type>
> } * const
> 
> The fix is to no longer subclass `HashtableEntry` from `CHeapObj`. Apparently that makes gdb happy. None of our code requires this subclass relationship.
> 
> Tested with tiers 1-4.

Lgtm.

-------------

Marked as reviewed by tschatzl (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3084


More information about the hotspot-dev mailing list