"STATIC",
};
- StrBuf Name = STATIC_STRBUF_INITIALIZER;
- StrBuf AsmName = STATIC_STRBUF_INITIALIZER;
- int StorageClass;
+ StrBuf Name = STATIC_STRBUF_INITIALIZER;
+ StrBuf Type = STATIC_STRBUF_INITIALIZER;
+ StrBuf AsmName = STATIC_STRBUF_INITIALIZER;
+ int StorageClass;
/* Parameters are separated by a comma */
/* Comma expected */
ConsumeComma ();
+ /* Type */
+ if (CurTok.Tok != TOK_STRCON) {
+ ErrorSkip ("String constant expected");
+ return;
+ }
+ SB_Copy (&Type, &CurTok.SVal);
+ NextTok ();
+
+ /* Comma expected */
+ ConsumeComma ();
+
/* The storage class follows */
if (CurTok.Tok != TOK_IDENT) {
ErrorSkip ("Storage class specifier expected");
/* Free memory used for the strings */
SB_Done (&AsmName);
+ SB_Done (&Type);
SB_Done (&Name);
}
"STATIC",
};
- StrBuf Name = STATIC_STRBUF_INITIALIZER;
- StrBuf AsmName = STATIC_STRBUF_INITIALIZER;
- int StorageClass;
- int Offs;
+ StrBuf Name = STATIC_STRBUF_INITIALIZER;
+ StrBuf Type = STATIC_STRBUF_INITIALIZER;
+ StrBuf AsmName = STATIC_STRBUF_INITIALIZER;
+ int StorageClass;
+ int Offs;
/* Parameters are separated by a comma */
/* Comma expected */
ConsumeComma ();
+ /* Type */
+ if (CurTok.Tok != TOK_STRCON) {
+ ErrorSkip ("String constant expected");
+ return;
+ }
+ SB_Copy (&Type, &CurTok.SVal);
+ NextTok ();
+
+ /* Comma expected */
+ ConsumeComma ();
+
/* The storage class follows */
if (CurTok.Tok != TOK_IDENT) {
ErrorSkip ("Storage class specifier expected");
/* Free memory used for the strings */
SB_Done (&AsmName);
+ SB_Done (&Type);
SB_Done (&Name);
}
const SymTable* Tab = Desc->SymTab;
/* Output info for the function itself */
- AddTextLine ("\t.dbg\tfunc, \"%s\", %s, \"%s\"",
+ AddTextLine ("\t.dbg\tfunc, \"%s\", \"\", %s, \"%s\"",
Sym->Name,
(Sym->Flags & SC_EXTERN)? "extern" : "static",
Sym->AsmName);
while (Sym) {
if ((Sym->Flags & (SC_CONST|SC_TYPE)) == 0) {
if (Sym->Flags & SC_AUTO) {
- AddTextLine ("\t.dbg\tsym, \"%s\", auto, %d",
+ AddTextLine ("\t.dbg\tsym, \"%s\", \"\", auto, %d",
Sym->Name, Sym->V.Offs);
} else if (Sym->Flags & SC_REGISTER) {
- AddTextLine ("\t.dbg\tsym, \"%s\", register, %d",
+ AddTextLine ("\t.dbg\tsym, \"%s\", \"\", register, %d",
Sym->Name, Sym->V.R.RegOffs);
} else {
- AddTextLine ("\t.dbg\tsym, \"%s\", %s, \"%s\"",
+ AddTextLine ("\t.dbg\tsym, \"%s\", \"\", %s, \"%s\"",
Sym->Name,
(Sym->Flags & SC_EXTERN)? "extern" : "static",
Sym->AsmName);