예제 #1
0
파일: tocvdebug.c 프로젝트: Geod24/dnet
void EnumDeclaration::toDebug()
{
    //printf("EnumDeclaration::toDebug('%s')\n", toChars());

    assert(config.fulltypes >= CV4);

    // If it is a member, it is handled by cvMember()
    if (!isMember())
    {
	unsigned length;
	const char *id = toPrettyChars();
	idx_t typidx = cv4_Denum(this);
	unsigned len = strlen(id);
	unsigned char *debsym = (unsigned char *) alloca(39 + IDOHD + len);

	// Output a 'user-defined type' for the tag name
	TOWORD(debsym + 2,S_UDT);
	TOIDX(debsym + 4,typidx);
	length = 2 + 2 + cgcv.sz_idx;
	length += cv_namestring(debsym + length,id);
	TOWORD(debsym,length - 2);

	assert(length <= 40 + len);
	obj_write_bytes(SegData[DEBSYM],length,debsym);
    }
}
예제 #2
0
파일: tocvdebug.c 프로젝트: OlioEngr/dmd
int EnumDeclaration::cvMember(unsigned char *p)
{
    char *id;
    idx_t typidx;
    int nwritten = 0;

    //printf("EnumDeclaration::cvMember() '%s'\n", toChars());
    id = toChars();

    if (!p)
    {
        nwritten = 4 + cv_stringbytes(id);
    }
    else
    {
        TOWORD(p,LF_NESTTYPE);
        typidx = cv4_Denum(this);
        TOWORD(p + 2,typidx);
        nwritten = 4 + cv_namestring(p + 4, id);
    }
    return nwritten;
}
예제 #3
0
파일: tocvdebug.c 프로젝트: John-Colvin/dmd
int EnumDeclaration::cvMember(unsigned char *p)
{
    //printf("EnumDeclaration::cvMember() '%s'\n", toChars());

    return ::cvMember(p, toChars(), cv4_Denum(this));
}
예제 #4
0
파일: tocvdebug.c 프로젝트: dacki/dmd
        void visit(EnumDeclaration *ed)
        {
            //printf("EnumDeclaration::cvMember() '%s'\n", d->toChars());

            cvMemberCommon(ed, ed->toChars(), cv4_Denum(ed));
        }