October 19, 2014
I am trying to debug an application compiled with no optimizations with dmd v2.065. I am trying to debug with gdb 7.7-0ubuntu3.1.

When I try to access certain variables (some local, some class members), here is the session I am getting:



(gdb) p stripeWidth
Internal error: `this' is not an aggregate
(gdb) ptype this
type = void *
(gdb) p this
$7 = (void *) 0x7fffd06abbc0
(gdb) p (RAID *)this
Internal error: `this' is not an aggregate
(gdb) p (RAID *)0x7fffd06abbc0
Internal error: `this' is not an aggregate

That last one is particularly strange, as it does not rely on this being anything in particular at all.

Searching the web for "this is not an aggregate" comes up with one bug against gdb was closed as invalid after the reporter did not respond to a request for more data for 7 years.

This problem is surprisingly frequent with the program I'm working on.

Ideas?

Shachar