mirror of
https://github.com/cc65/cc65.git
synced 2025-02-06 12:31:12 +00:00
Add a (currently empty) type string to the debug info for symbols and functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5274 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
2fbebd25cf
commit
6b8efa8e9b
@ -112,9 +112,10 @@ void DbgInfoFunc (void)
|
||||
"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 */
|
||||
@ -131,6 +132,17 @@ void DbgInfoFunc (void)
|
||||
/* 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");
|
||||
@ -156,6 +168,7 @@ void DbgInfoFunc (void)
|
||||
|
||||
/* Free memory used for the strings */
|
||||
SB_Done (&AsmName);
|
||||
SB_Done (&Type);
|
||||
SB_Done (&Name);
|
||||
}
|
||||
|
||||
@ -222,10 +235,11 @@ void DbgInfoSym (void)
|
||||
"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 */
|
||||
@ -242,6 +256,17 @@ void DbgInfoSym (void)
|
||||
/* 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");
|
||||
@ -276,6 +301,7 @@ void DbgInfoSym (void)
|
||||
|
||||
/* Free memory used for the strings */
|
||||
SB_Done (&AsmName);
|
||||
SB_Done (&Type);
|
||||
SB_Done (&Name);
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ static void EmitDebugInfo (void)
|
||||
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);
|
||||
@ -378,14 +378,14 @@ static void EmitDebugInfo (void)
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user