From 2c3d07fa0e0bb9a672c4c39b04e9c597317d38ab Mon Sep 17 00:00:00 2001 From: NF Stevens Date: Thu, 28 Jan 1999 17:37:49 +0000 Subject: [PATCH] Implemented the symbolfile command (as mentioned by the help command). This reads a symbol file in the format generated by nm. --- debugger/dbg.y | 2 ++ debugger/debug.l | 1 + 2 files changed, 3 insertions(+) diff --git a/debugger/dbg.y b/debugger/dbg.y index 24e0f022ec7..7362693a6ce 100644 --- a/debugger/dbg.y +++ b/debugger/dbg.y @@ -66,6 +66,7 @@ extern void VIRTUAL_Dump(void); /* memory/virtual.c */ %token tIDENTIFIER tSTRING tDEBUGSTR %token tNUM tFORMAT %token tREG +%token tSYMBOLFILE %token tCHAR tSHORT tINT tLONG tFLOAT tDOUBLE tUNSIGNED tSIGNED %token tSTRUCT tUNION tENUM @@ -156,6 +157,7 @@ command: | 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 fd31b35d42a..e7b24c0b950 100644 --- a/debugger/debug.l +++ b/debugger/debug.l @@ -142,6 +142,7 @@ $gs { yylval.reg = REG_GS; return tREG; } mode { BEGIN(NOCMD); return tMODE; } show|sho|sh { BEGIN(SHOW_CMD); return tSHOW; } +symbolfile|symbols|symbol|sf { BEGIN(PATH_EXPECTED); return tSYMBOLFILE; } break|brea|bre|br|b { BEGIN(PATH_EXPECTED); return tBREAK; }