Implemented the symbolfile command (as mentioned by the help
command). This reads a symbol file in the format generated by nm.
diff --git a/debugger/dbg.y b/debugger/dbg.y
index 24e0f02..7362693 100644
--- a/debugger/dbg.y
+++ b/debugger/dbg.y
@@ -66,6 +66,7 @@
%token <string> tIDENTIFIER tSTRING tDEBUGSTR
%token <integer> tNUM tFORMAT
%token <reg> tREG
+%token tSYMBOLFILE
%token tCHAR tSHORT tINT tLONG tFLOAT tDOUBLE tUNSIGNED tSIGNED
%token tSTRUCT tUNION tENUM
@@ -156,6 +157,7 @@
| tCOND tNUM tEOL { DEBUG_AddBPCondition($2, NULL); }
| tCOND tNUM expr tEOL { DEBUG_AddBPCondition($2, $3); }
| tDEBUGMSG tDEBUGSTR tEOL { MAIN_ParseDebugOptions($2); }
+ | tSYMBOLFILE pathname tEOL{ DEBUG_ReadSymbolTable($2); }
| list_command
| disassemble_command
| set_command
diff --git a/debugger/debug.l b/debugger/debug.l
index fd31b35..e7b24c0 100644
--- a/debugger/debug.l
+++ b/debugger/debug.l
@@ -142,6 +142,7 @@
<INITIAL>mode { BEGIN(NOCMD); return tMODE; }
<INITIAL>show|sho|sh { BEGIN(SHOW_CMD); return tSHOW; }
+<INITIAL>symbolfile|symbols|symbol|sf { BEGIN(PATH_EXPECTED); return tSYMBOLFILE; }
<INITIAL,INFO_CMD,DEL_CMD>break|brea|bre|br|b { BEGIN(PATH_EXPECTED); return tBREAK; }