Accessing vtable, initialiser, etc symbols from debug (gdb)

Iain Buclaw ibuclaw at gdcproject.org
Thu Jan 2 03:35:16 PST 2014


On 30 December 2013 12:57, Jacob Carlborg <doob at me.com> wrote:
> On 2013-12-30 13:24, Iain Buclaw wrote:
>
>> However I'm not sure if the names are sufficient, and whether or not
>> they should really be prefixed with a double underscore to ensure that
>> they don't conflict with user-declared members (especially the
>> compiler-generated symbols).
>
>
> I think they should have some kind of prefix to avoid conflict with user
> declared symbols and somehow indicate they're special symbols.
>


Special symbols can be suffixed with a $ perhaps.  I can't think of
any other symbol that would work.

__init -> init$
__Class -> classinfo$
__vtbl -> vtable$
__interface -> interfaceinfo$
__ModuleInfo -> moduleinfo$


The alternative is to just go for prefixing with double underscore,
given that the names are OK?

__init -> __init
__Class -> __classinfo
__vtbl -> __vtable
__interface -> __interfaceinfo
__ModuleInfo -> __moduleinfo


Regards
Iain


More information about the Digitalmars-d mailing list