mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-29 08:30:04 +00:00
Debugger: 2.9.1.7 Added: Extended SYM command to auto-generate symbol names when reverse engineering. NOTE: These symbols will be placed in User2.
This commit is contained in:
parent
1f5ca5d7e7
commit
17686df3df
@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#define ALLOW_INPUT_LOWERCASE 1
|
||||
|
||||
// See /docs/Debugger_Changelog.txt for full details
|
||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,6);
|
||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,7);
|
||||
|
||||
|
||||
// Public _________________________________________________________________________________________
|
||||
|
@ -909,25 +909,45 @@ void SymbolUpdate( SymbolTable_Index_e eSymbolTable, const char *pSymbolName, WO
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Syntax:
|
||||
// sym ! <symbol>
|
||||
// sym ~ <symbol>
|
||||
// sym <symbol> =
|
||||
// sym @ = <addr>
|
||||
// NOTE: Listing of the symbols is handled via returning UPDATE_NOTHING which is triggered by:
|
||||
// sym *
|
||||
//===========================================================================
|
||||
Update_t _CmdSymbolsUpdate( int nArgs, int bSymbolTables )
|
||||
{
|
||||
bool bRemoveSymbol = false;
|
||||
bool bUpdateSymbol = false;
|
||||
|
||||
if ((nArgs == 2) &&
|
||||
((g_aArgs[ 1 ].eToken == TOKEN_EXCLAMATION) || (g_aArgs[1].eToken == TOKEN_TILDE)) )
|
||||
TCHAR *pSymbolName = g_aArgs[1].sArg;
|
||||
WORD nAddress = g_aArgs[3].nValue;
|
||||
|
||||
if ((nArgs == 2)
|
||||
&& ((g_aArgs[ 1 ].eToken == TOKEN_EXCLAMATION) || (g_aArgs[1].eToken == TOKEN_TILDE)) )
|
||||
bRemoveSymbol = true;
|
||||
|
||||
if ((nArgs == 3) && (g_aArgs[ 2 ].eToken == TOKEN_EQUAL ))
|
||||
bUpdateSymbol = true;
|
||||
|
||||
// 2.9.1.7 Added: QoL for automatic symbol names
|
||||
if ((nArgs == 2)
|
||||
&& (g_aArgRaw[ 1 ].eToken == TOKEN_AT ) // NOTE: @ is parsed and evaluated and NOT in the cooked args
|
||||
&& (g_aArgs [ 1 ].eToken == TOKEN_EQUAL))
|
||||
{
|
||||
if (bSymbolTables == SYMBOL_TABLE_USER_1)
|
||||
bSymbolTables = SYMBOL_TABLE_USER_2; // Autogenerated symbol names go in table 2 for organization when reverse engineering. Table 1 = known, Table 2 = unknown.
|
||||
|
||||
nAddress = g_aArgs[2].nValue;
|
||||
sprintf( g_aArgs[1].sArg, "_%04X", nAddress ); // Autogenerated symbol name
|
||||
|
||||
bUpdateSymbol = true;
|
||||
}
|
||||
|
||||
if (bRemoveSymbol || bUpdateSymbol)
|
||||
{
|
||||
TCHAR *pSymbolName = g_aArgs[1].sArg;
|
||||
WORD nAddress = g_aArgs[3].nValue;
|
||||
|
||||
int iTable = _GetSymbolTableFromFlag( bSymbolTables );
|
||||
SymbolUpdate( (SymbolTable_Index_e) iTable, pSymbolName, nAddress, bRemoveSymbol, bUpdateSymbol );
|
||||
return ConsoleUpdate();
|
||||
|
Loading…
Reference in New Issue
Block a user