mirror of
https://github.com/cc65/cc65.git
synced 2025-02-27 14:29:52 +00:00
Renamed EXP_INITIALIZER
git-svn-id: svn://svn.cc65.org/cc65/trunk@409 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
e5c029e538
commit
99c9f4fe4e
@ -1079,7 +1079,7 @@ void WriteExports (void)
|
|||||||
|
|
||||||
/* Add the initializer bits */
|
/* Add the initializer bits */
|
||||||
if (S->Flags & SF_INITIALIZER) {
|
if (S->Flags & SF_INITIALIZER) {
|
||||||
ExprMask |= EXP_INITIALIZER;
|
ExprMask |= EXP_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write the type */
|
/* Write the type */
|
||||||
@ -1151,7 +1151,7 @@ void WriteDbgSyms (void)
|
|||||||
|
|
||||||
/* Add the initializer bits */
|
/* Add the initializer bits */
|
||||||
if (S->Flags & SF_INITIALIZER) {
|
if (S->Flags & SF_INITIALIZER) {
|
||||||
ExprMask |= EXP_INITIALIZER;
|
ExprMask |= EXP_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write the type */
|
/* Write the type */
|
||||||
|
@ -196,6 +196,32 @@ static unsigned SkipFragment (FILE* F)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static const char* GetExportFlags (unsigned Flags)
|
||||||
|
/* Get the export flags as a (static) string */
|
||||||
|
{
|
||||||
|
/* Static buffer */
|
||||||
|
static char TypeDesc[128];
|
||||||
|
|
||||||
|
/* Get the flags */
|
||||||
|
TypeDesc[0] = '\0';
|
||||||
|
switch (Flags & EXP_MASK_SIZE) {
|
||||||
|
case EXP_ABS: strcat (TypeDesc, "EXP_ABS"); break;
|
||||||
|
case EXP_ZP: strcat (TypeDesc, "EXP_ZP"); break;
|
||||||
|
}
|
||||||
|
switch (Flags & EXP_MASK_VAL) {
|
||||||
|
case EXP_CONST: strcat (TypeDesc, ",EXP_CONST"); break;
|
||||||
|
case EXP_EXPR: strcat (TypeDesc, ",EXP_EXPR"); break;
|
||||||
|
}
|
||||||
|
if (IS_EXP_INIT (Flags)) {
|
||||||
|
strcat (TypeDesc, ",EXP_INIT");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return the result */
|
||||||
|
return TypeDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void DumpObjHeader (FILE* F, unsigned long Offset)
|
void DumpObjHeader (FILE* F, unsigned long Offset)
|
||||||
/* Dump the header of the given object file */
|
/* Dump the header of the given object file */
|
||||||
{
|
{
|
||||||
@ -537,7 +563,6 @@ void DumpObjExports (FILE* F, unsigned long Offset)
|
|||||||
|
|
||||||
unsigned long Value = 0;
|
unsigned long Value = 0;
|
||||||
int HaveValue;
|
int HaveValue;
|
||||||
char TypeDesc[128];
|
|
||||||
|
|
||||||
/* Read the data for one export */
|
/* Read the data for one export */
|
||||||
unsigned char Type = Read8 (F);
|
unsigned char Type = Read8 (F);
|
||||||
@ -552,25 +577,11 @@ void DumpObjExports (FILE* F, unsigned long Offset)
|
|||||||
}
|
}
|
||||||
ReadFilePos (F, &Pos);
|
ReadFilePos (F, &Pos);
|
||||||
|
|
||||||
/* Get a description for the type */
|
|
||||||
TypeDesc[0] = '\0';
|
|
||||||
switch (Type & EXP_MASK_SIZE) {
|
|
||||||
case EXP_ABS: strcat (TypeDesc, "EXP_ABS"); break;
|
|
||||||
case EXP_ZP: strcat (TypeDesc, "EXP_ZP"); break;
|
|
||||||
}
|
|
||||||
switch (Type & EXP_MASK_VAL) {
|
|
||||||
case EXP_CONST: strcat (TypeDesc, ",EXP_CONST"); break;
|
|
||||||
case EXP_EXPR: strcat (TypeDesc, ",EXP_EXPR"); break;
|
|
||||||
}
|
|
||||||
if (Type & EXP_INITIALIZER) {
|
|
||||||
strcat (TypeDesc, ",EXP_INITIALIZER");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print the header */
|
/* Print the header */
|
||||||
printf (" Index:%27u\n", I);
|
printf (" Index:%27u\n", I);
|
||||||
|
|
||||||
/* Print the data */
|
/* Print the data */
|
||||||
printf (" Type:%22s0x%02X (%s)\n", "", Type, TypeDesc);
|
printf (" Type:%22s0x%02X (%s)\n", "", Type, GetExportFlags (Type));
|
||||||
printf (" Name:%*s\"%s\"\n", 24-Len, "", Name);
|
printf (" Name:%*s\"%s\"\n", 24-Len, "", Name);
|
||||||
if (HaveValue) {
|
if (HaveValue) {
|
||||||
printf (" Value:%15s0x%08lX (%lu)\n", "", Value, Value);
|
printf (" Value:%15s0x%08lX (%lu)\n", "", Value, Value);
|
||||||
@ -619,7 +630,6 @@ void DumpObjDbgSyms (FILE* F, unsigned long Offset)
|
|||||||
|
|
||||||
unsigned long Value = 0;
|
unsigned long Value = 0;
|
||||||
int HaveValue;
|
int HaveValue;
|
||||||
const char* TypeDesc;
|
|
||||||
|
|
||||||
/* Read the data for one symbol */
|
/* Read the data for one symbol */
|
||||||
unsigned char Type = Read8 (F);
|
unsigned char Type = Read8 (F);
|
||||||
@ -634,20 +644,11 @@ void DumpObjDbgSyms (FILE* F, unsigned long Offset)
|
|||||||
}
|
}
|
||||||
ReadFilePos (F, &Pos);
|
ReadFilePos (F, &Pos);
|
||||||
|
|
||||||
/* Get a description for the type */
|
|
||||||
switch (Type) {
|
|
||||||
case EXP_ABS|EXP_CONST: TypeDesc = "EXP_ABS,EXP_CONST"; break;
|
|
||||||
case EXP_ZP|EXP_CONST: TypeDesc = "EXP_ZP,EXP_CONST"; break;
|
|
||||||
case EXP_ABS|EXP_EXPR: TypeDesc = "EXP_ABS,EXP_EXPR"; break;
|
|
||||||
case EXP_ZP|EXP_EXPR: TypeDesc = "EXP_ZP,EXP_EXPR"; break;
|
|
||||||
default: TypeDesc = "EXP_UNKNOWN"; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print the header */
|
/* Print the header */
|
||||||
printf (" Index:%27u\n", I);
|
printf (" Index:%27u\n", I);
|
||||||
|
|
||||||
/* Print the data */
|
/* Print the data */
|
||||||
printf (" Type:%22s0x%02X (%s)\n", "", Type, TypeDesc);
|
printf (" Type:%22s0x%02X (%s)\n", "", Type, GetExportFlags (Type));
|
||||||
printf (" Name:%*s\"%s\"\n", 24-Len, "", Name);
|
printf (" Name:%*s\"%s\"\n", 24-Len, "", Name);
|
||||||
if (HaveValue) {
|
if (HaveValue) {
|
||||||
printf (" Value:%15s0x%08lX (%lu)\n", "", Value, Value);
|
printf (" Value:%15s0x%08lX (%lu)\n", "", Value, Value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user