From 674289e4716fd450eac7956a8af07d4eb8907c31 Mon Sep 17 00:00:00 2001 From: uz Date: Tue, 17 Aug 2010 21:04:28 +0000 Subject: [PATCH] use ReadVar to read the type. This doesn't make a difference for now but will come handy later. Add output for all of the symbol flags from symdefs.h. git-svn-id: svn://svn.cc65.org/cc65/trunk@4814 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/od65/dump.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/od65/dump.c b/src/od65/dump.c index 8eb54f02c..26b0c38e9 100644 --- a/src/od65/dump.c +++ b/src/od65/dump.c @@ -172,11 +172,23 @@ static const char* GetExportFlags (unsigned Flags, const unsigned char* ConDes) unsigned Count; unsigned I; - /* Type of expression */ + /* Symbol type */ TypeDesc[0] = '\0'; + switch (Flags & SYM_MASK_TYPE) { + case SYM_STD: strcat (TypeDesc, "SYM_STD"); break; + case SYM_CHEAP_LOCAL: strcat (TypeDesc, "SYM_CHEAP_LOCAL"); break; + } + + /* Symbol usage */ + switch (Flags & SYM_MASK_LABEL) { + case SYM_EQUATE: strcat (TypeDesc, ",SYM_EQUATE"); break; + case SYM_LABEL: strcat (TypeDesc, ",SYM_LABEL"); break; + } + + /* Type of expression */ switch (Flags & SYM_MASK_VAL) { - case SYM_CONST: strcat (TypeDesc, "SYM_CONST"); break; - case SYM_EXPR: strcat (TypeDesc, "SYM_EXPR"); break; + case SYM_CONST: strcat (TypeDesc, ",SYM_CONST"); break; + case SYM_EXPR: strcat (TypeDesc, ",SYM_EXPR"); break; } /* Constructor/destructor declarations */ @@ -543,7 +555,7 @@ void DumpObjExports (FILE* F, unsigned long Offset) /* Read the data for one export */ - unsigned char Type = Read8 (F); + unsigned Type = ReadVar (F); unsigned char AddrSize = Read8 (F); ReadData (F, ConDes, SYM_GET_CONDES_COUNT (Type)); Name = GetString (&StrPool, ReadVar (F)); @@ -617,7 +629,7 @@ void DumpObjDbgSyms (FILE* F, unsigned long Offset) int HaveValue; /* Read the data for one symbol */ - unsigned char Type = Read8 (F); + unsigned Type = ReadVar (F); unsigned char AddrSize = Read8 (F); const char* Name = GetString (&StrPool, ReadVar (F)); unsigned Len = strlen (Name); -- 2.39.5