From: uz Date: Mon, 29 Aug 2011 20:37:28 +0000 (+0000) Subject: Renamed hldbgsym -> hlldbgsym. X-Git-Tag: V2.13.3~179 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=060cfe66e01ea19d375bfb56779802bd9f886ea6;p=cc65 Renamed hldbgsym -> hlldbgsym. git-svn-id: svn://svn.cc65.org/cc65/trunk@5283 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/dbginfo.c b/src/ca65/dbginfo.c index e4f50159f..d2fb2c364 100644 --- a/src/ca65/dbginfo.c +++ b/src/ca65/dbginfo.c @@ -37,7 +37,7 @@ /* common */ #include "coll.h" -#include "hldbgsym.h" +#include "hlldbgsym.h" #include "strbuf.h" /* ca65 */ @@ -63,7 +63,7 @@ static LineInfo* CurLineInfo = 0; /* List of high level language debug symbols */ -static Collection HLDbgSyms = STATIC_COLLECTION_INITIALIZER; +static Collection HLLDbgSyms = STATIC_COLLECTION_INITIALIZER; @@ -73,11 +73,11 @@ static Collection HLDbgSyms = STATIC_COLLECTION_INITIALIZER; -static HLDbgSym* NewHLDbgSym (unsigned Flags, unsigned Name, unsigned Type) -/* Allocate and return a new HLDbgSym structure */ +static HLLDbgSym* NewHLLDbgSym (unsigned Flags, unsigned Name, unsigned Type) +/* Allocate and return a new HLLDbgSym structure */ { /* Allocate memory */ - HLDbgSym* S = xmalloc (sizeof (*S)); + HLLDbgSym* S = xmalloc (sizeof (*S)); /* Initialize the fields as necessary */ S->Flags = Flags; @@ -144,7 +144,7 @@ void DbgInfoFunc (void) unsigned Type; unsigned AsmName; unsigned Flags; - HLDbgSym* S; + HLLDbgSym* S; /* Parameters are separated by a comma */ @@ -178,8 +178,8 @@ void DbgInfoFunc (void) return; } switch (GetSubKey (StorageKeys, sizeof (StorageKeys)/sizeof (StorageKeys[0]))) { - case 0: Flags = HL_TYPE_FUNC | HL_SC_EXTERN; break; - case 1: Flags = HL_TYPE_FUNC | HL_SC_STATIC; break; + case 0: Flags = HLL_TYPE_FUNC | HLL_SC_EXTERN; break; + case 1: Flags = HLL_TYPE_FUNC | HLL_SC_STATIC; break; default: ErrorSkip ("Storage class specifier expected"); return; } NextTok (); @@ -206,9 +206,9 @@ void DbgInfoFunc (void) CurrentScope->Flags |= ST_EXTFUNC; /* Add the function */ - S = NewHLDbgSym (Flags, Name, Type); + S = NewHLLDbgSym (Flags, Name, Type); S->AsmName = AsmName; - CollAppend (&HLDbgSyms, S); + CollAppend (&HLLDbgSyms, S); } @@ -279,7 +279,7 @@ void DbgInfoSym (void) unsigned AsmName = EMPTY_STRING_ID; unsigned Flags; int Offs; - HLDbgSym* S; + HLLDbgSym* S; /* Parameters are separated by a comma */ @@ -313,10 +313,10 @@ void DbgInfoSym (void) return; } switch (GetSubKey (StorageKeys, sizeof (StorageKeys)/sizeof (StorageKeys[0]))) { - case 0: Flags = HL_SC_AUTO; break; - case 1: Flags = HL_SC_EXTERN; break; - case 2: Flags = HL_SC_REG; break; - case 3: Flags = HL_SC_STATIC; break; + case 0: Flags = HLL_SC_AUTO; break; + case 1: Flags = HLL_SC_EXTERN; break; + case 2: Flags = HLL_SC_REG; break; + case 3: Flags = HLL_SC_STATIC; break; default: ErrorSkip ("Storage class specifier expected"); return; } @@ -325,7 +325,7 @@ void DbgInfoSym (void) ConsumeComma (); /* The next tokens depend on the storage class */ - if (Flags == HL_SC_AUTO) { + if (Flags == HLL_SC_AUTO) { /* Auto: Stack offset follows */ Offs = ConstExpression (); } else { @@ -338,22 +338,22 @@ void DbgInfoSym (void) NextTok (); /* For register, an offset follows */ - if (Flags == HL_SC_REG) { + if (Flags == HLL_SC_REG) { ConsumeComma (); Offs = ConstExpression (); } } /* Add the function */ - S = NewHLDbgSym (Flags | HL_TYPE_SYM, Name, Type); + S = NewHLLDbgSym (Flags | HLL_TYPE_SYM, Name, Type); S->AsmName = AsmName; S->Offs = Offs; - CollAppend (&HLDbgSyms, S); + CollAppend (&HLLDbgSyms, S); } -void WriteHLDbgSyms (void) +void WriteHLLDbgSyms (void) /* Write a list of all high level language symbols to the object file. */ { unsigned I; @@ -362,13 +362,13 @@ void WriteHLDbgSyms (void) if (DbgSyms) { /* Write the symbol count to the list */ - ObjWriteVar (CollCount (&HLDbgSyms)); + ObjWriteVar (CollCount (&HLLDbgSyms)); /* Walk through list and write all symbols to the file. */ - for (I = 0; I < CollCount (&HLDbgSyms); ++I) { + for (I = 0; I < CollCount (&HLLDbgSyms); ++I) { /* Get the next symbol */ - const HLDbgSym* S = CollAtUnchecked (&HLDbgSyms, I); + const HLLDbgSym* S = CollAtUnchecked (&HLLDbgSyms, I); /* Write the symbol data */ ObjWriteVar (S->Flags); diff --git a/src/ca65/dbginfo.h b/src/ca65/dbginfo.h index 5604067b2..f8da71461 100644 --- a/src/ca65/dbginfo.h +++ b/src/ca65/dbginfo.h @@ -56,7 +56,7 @@ void DbgInfoLine (void); void DbgInfoSym (void); /* Parse and handle SYM subcommand of the .dbg pseudo instruction */ -void WriteHLDbgSyms (void); +void WriteHLLDbgSyms (void); /* Write a list of all high level language symbols to the object file. */ diff --git a/src/ca65/symtab.c b/src/ca65/symtab.c index acb1ed3bb..a6d1cbfdd 100644 --- a/src/ca65/symtab.c +++ b/src/ca65/symtab.c @@ -911,7 +911,7 @@ void WriteDbgSyms (void) } /* Write the high level symbols */ - WriteHLDbgSyms (); + WriteHLLDbgSyms (); /* Done writing debug symbols */ ObjEndDbgSyms (); diff --git a/src/common/hldbgsym.h b/src/common/hldbgsym.h deleted file mode 100644 index 68f328f4f..000000000 --- a/src/common/hldbgsym.h +++ /dev/null @@ -1,89 +0,0 @@ -/*****************************************************************************/ -/* */ -/* hldbgsym.h */ -/* */ -/* Definitions for high level language debug symbols */ -/* */ -/* */ -/* */ -/* (C) 2011, Ullrich von Bassewitz */ -/* Roemerstrasse 52 */ -/* D-70794 Filderstadt */ -/* EMail: uz@cc65.org */ -/* */ -/* */ -/* This software is provided 'as-is', without any expressed or implied */ -/* warranty. In no event will the authors be held liable for any damages */ -/* arising from the use of this software. */ -/* */ -/* Permission is granted to anyone to use this software for any purpose, */ -/* including commercial applications, and to alter it and redistribute it */ -/* freely, subject to the following restrictions: */ -/* */ -/* 1. The origin of this software must not be misrepresented; you must not */ -/* claim that you wrote the original software. If you use this software */ -/* in a product, an acknowledgment in the product documentation would be */ -/* appreciated but is not required. */ -/* 2. Altered source versions must be plainly marked as such, and must not */ -/* be misrepresented as being the original software. */ -/* 3. This notice may not be removed or altered from any source */ -/* distribution. */ -/* */ -/*****************************************************************************/ - - - -/* This module contains definitions for high level language symbols passed - * down from the C compiler. They're collected in the assembler and written to - * the object file in binary form, then again read by the linker and finally - * placed in the debug info file. - */ - - - -#ifndef HLDBGSYM_H -#define HLDBGSYM_H - - - -/*****************************************************************************/ -/* Data */ -/*****************************************************************************/ - - - -/* Flag bits that tell something about the symbol */ -#define HL_TYPE_FUNC 0x0000U /* Function */ -#define HL_TYPE_SYM 0x0001U /* Symbol */ -#define HL_TYPE_MASK 0x0007U -#define HL_GET_TYPE(x) ((x) & HL_TYPE_MASK) -#define HL_IS_FUNC(x) (HL_GET_TYPE(x) == HL_TYPE_FUNC) -#define HL_IS_SYM(x) (HL_GET_TYPE(x) == HL_TYPE_SYM) - -/* Storage class */ -#define HL_SC_AUTO 0x0000U /* On stack */ -#define HL_SC_REG 0x0008U /* Register */ -#define HL_SC_STATIC 0x0010U /* Static linkage */ -#define HL_SC_EXTERN 0x0018U /* External linkage */ -#define HL_SC_MASK 0x0078U -#define HL_GET_SC(x) ((x) & HL_SC_MASK) - -/* Structure used for a high level function or symbol */ -typedef struct HLDbgSym HLDbgSym; -struct HLDbgSym { - unsigned Flags; /* See above */ - unsigned Name; /* String id of name */ - unsigned AsmName; /* String id of assembler name */ - int Offs; /* Offset if any */ - unsigned Type; /* String id of type */ - unsigned ScopeId; /* Id of parent scope */ -}; - - - -/* End of hldbgsyms.h */ - -#endif - - - diff --git a/src/common/hlldbgsym.h b/src/common/hlldbgsym.h new file mode 100644 index 000000000..879c05c65 --- /dev/null +++ b/src/common/hlldbgsym.h @@ -0,0 +1,89 @@ +/*****************************************************************************/ +/* */ +/* hlldbgsym.h */ +/* */ +/* Definitions for high level language debug symbols */ +/* */ +/* */ +/* */ +/* (C) 2011, Ullrich von Bassewitz */ +/* Roemerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ +/* */ +/* */ +/* This software is provided 'as-is', without any expressed or implied */ +/* warranty. In no event will the authors be held liable for any damages */ +/* arising from the use of this software. */ +/* */ +/* Permission is granted to anyone to use this software for any purpose, */ +/* including commercial applications, and to alter it and redistribute it */ +/* freely, subject to the following restrictions: */ +/* */ +/* 1. The origin of this software must not be misrepresented; you must not */ +/* claim that you wrote the original software. If you use this software */ +/* in a product, an acknowledgment in the product documentation would be */ +/* appreciated but is not required. */ +/* 2. Altered source versions must be plainly marked as such, and must not */ +/* be misrepresented as being the original software. */ +/* 3. This notice may not be removed or altered from any source */ +/* distribution. */ +/* */ +/*****************************************************************************/ + + + +/* This module contains definitions for high level language symbols passed + * down from the C compiler. They're collected in the assembler and written to + * the object file in binary form, then again read by the linker and finally + * placed in the debug info file. + */ + + + +#ifndef HLLDBGSYM_H +#define HLLDBGSYM_H + + + +/*****************************************************************************/ +/* Data */ +/*****************************************************************************/ + + + +/* Flag bits that tell something about the symbol */ +#define HLL_TYPE_FUNC 0x0000U /* Function */ +#define HLL_TYPE_SYM 0x0001U /* Symbol */ +#define HLL_TYPE_MASK 0x0007U +#define HLL_GET_TYPE(x) ((x) & HL_TYPE_MASK) +#define HLL_IS_FUNC(x) (HL_GET_TYPE(x) == HL_TYPE_FUNC) +#define HLL_IS_SYM(x) (HL_GET_TYPE(x) == HL_TYPE_SYM) + +/* Storage class */ +#define HLL_SC_AUTO 0x0000U /* On stack */ +#define HLL_SC_REG 0x0008U /* Register */ +#define HLL_SC_STATIC 0x0010U /* Static linkage */ +#define HLL_SC_EXTERN 0x0018U /* External linkage */ +#define HLL_SC_MASK 0x0078U +#define HLL_GET_SC(x) ((x) & HL_SC_MASK) + +/* Structure used for a high level language function or symbol */ +typedef struct HLLDbgSym HLLDbgSym; +struct HLLDbgSym { + unsigned Flags; /* See above */ + unsigned Name; /* String id of name */ + unsigned AsmName; /* String id of assembler name */ + int Offs; /* Offset if any */ + unsigned Type; /* String id of type */ + unsigned ScopeId; /* Id of parent scope */ +}; + + + +/* End of hlldbgsyms.h */ + +#endif + + +