mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-08-15 18:27:29 +00:00
Debugger: 2.9.1.8 Changed: Disassembly window now lists symbol labels and symbol target address from User2 in orange.
This commit is contained in:
@@ -1,6 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
2.9.1.6 Added: Branch instructions now show target address
|
2.9.1.8 Changed: Disassembly window now lists symbol labels and symbol target address from User2 in orange.
|
||||||
|
Example:
|
||||||
|
U 300
|
||||||
|
SYM @ = 303
|
||||||
|
300: 20 03 03
|
||||||
|
2.9.1.7 Added: Extended SYM command to auto-generate symbol names when reverse engineering. NOTE: These symbols will be placed in User2.
|
||||||
|
Example:
|
||||||
|
SYM @ = 800 // Alias for: SYM _0800 = 0800
|
||||||
|
2.9.1.6 Added: Branch instructions now show target address.
|
||||||
2.9.1.5 Added: Disassembly window now shows signed decimal values for immediate values.
|
2.9.1.5 Added: Disassembly window now shows signed decimal values for immediate values.
|
||||||
2.9.1.4 Changed: Show symbol warnings in Orange, and length of symbols in light blue.
|
2.9.1.4 Changed: Show symbol warnings in Orange, and length of symbols in light blue.
|
||||||
2.9.1.3 Added: DB commanoptionally supports =
|
2.9.1.3 Added: DB commanoptionally supports =
|
||||||
|
@@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
#define ALLOW_INPUT_LOWERCASE 1
|
#define ALLOW_INPUT_LOWERCASE 1
|
||||||
|
|
||||||
// See /docs/Debugger_Changelog.txt for full details
|
// See /docs/Debugger_Changelog.txt for full details
|
||||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,7);
|
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,8);
|
||||||
|
|
||||||
|
|
||||||
// Public _________________________________________________________________________________________
|
// Public _________________________________________________________________________________________
|
||||||
|
@@ -275,7 +275,7 @@ int GetDisassemblyLine(WORD nBaseAddress, DisasmLine_t& line_)
|
|||||||
const char* pTarget = NULL;
|
const char* pTarget = NULL;
|
||||||
const char* pSymbol = 0;
|
const char* pSymbol = 0;
|
||||||
|
|
||||||
pSymbol = FindSymbolFromAddress(nTarget);
|
pSymbol = FindSymbolFromAddress(nTarget, &line_.iTargetTable);
|
||||||
|
|
||||||
// Data Assembler
|
// Data Assembler
|
||||||
if (pData && (!pData->bSymbolLookup))
|
if (pData && (!pData->bSymbolLookup))
|
||||||
@@ -290,7 +290,7 @@ int GetDisassemblyLine(WORD nBaseAddress, DisasmLine_t& line_)
|
|||||||
|
|
||||||
if (!(bDisasmFormatFlags & DISASM_FORMAT_SYMBOL))
|
if (!(bDisasmFormatFlags & DISASM_FORMAT_SYMBOL))
|
||||||
{
|
{
|
||||||
pSymbol = FindSymbolFromAddress(nTarget - 1);
|
pSymbol = FindSymbolFromAddress(nTarget - 1, &line_.iTargetTable);
|
||||||
if (pSymbol)
|
if (pSymbol)
|
||||||
{
|
{
|
||||||
bDisasmFormatFlags |= DISASM_FORMAT_SYMBOL;
|
bDisasmFormatFlags |= DISASM_FORMAT_SYMBOL;
|
||||||
@@ -312,7 +312,7 @@ int GetDisassemblyLine(WORD nBaseAddress, DisasmLine_t& line_)
|
|||||||
// nSecondTarget = g_bDebugConfig_DisasmMatchSymbolOffsetMinus1First ? nTarget+1 : nTarget-1;
|
// nSecondTarget = g_bDebugConfig_DisasmMatchSymbolOffsetMinus1First ? nTarget+1 : nTarget-1;
|
||||||
if (!(bDisasmFormatFlags & DISASM_FORMAT_SYMBOL) || pData)
|
if (!(bDisasmFormatFlags & DISASM_FORMAT_SYMBOL) || pData)
|
||||||
{
|
{
|
||||||
pSymbol = FindSymbolFromAddress(nTarget + 1);
|
pSymbol = FindSymbolFromAddress(nTarget + 1,&line_.iTargetTable);
|
||||||
if (pSymbol)
|
if (pSymbol)
|
||||||
{
|
{
|
||||||
bDisasmFormatFlags |= DISASM_FORMAT_SYMBOL;
|
bDisasmFormatFlags |= DISASM_FORMAT_SYMBOL;
|
||||||
|
@@ -1330,7 +1330,9 @@ WORD DrawDisassemblyLine ( int iLine, const WORD nBaseAddress )
|
|||||||
int iOpmode;
|
int iOpmode;
|
||||||
int nOpbyte;
|
int nOpbyte;
|
||||||
DisasmLine_t line;
|
DisasmLine_t line;
|
||||||
const char* pSymbol = FindSymbolFromAddress( nBaseAddress );
|
|
||||||
|
int iTable = NUM_SYMBOL_TABLES;
|
||||||
|
const char* pSymbol = FindSymbolFromAddress( nBaseAddress, &iTable );
|
||||||
const char* pMnemonic = NULL;
|
const char* pMnemonic = NULL;
|
||||||
|
|
||||||
// Data Disassembler
|
// Data Disassembler
|
||||||
@@ -1557,7 +1559,12 @@ WORD DrawDisassemblyLine ( int iLine, const WORD nBaseAddress )
|
|||||||
if (pSymbol)
|
if (pSymbol)
|
||||||
{
|
{
|
||||||
if (! bCursorLine)
|
if (! bCursorLine)
|
||||||
DebuggerSetColorFG( DebuggerGetColor( FG_DISASM_SYMBOL ) );
|
{
|
||||||
|
if (iTable == SYMBOLS_USER_2)
|
||||||
|
DebuggerSetColorFG( DebuggerGetColor( FG_INFO_ADDRESS ) ); // Show user symbols 2 in different color for organization when reverse engineering. Table 1 = known, Table 2 = unknown.
|
||||||
|
else
|
||||||
|
DebuggerSetColorFG( DebuggerGetColor( FG_DISASM_SYMBOL ) );
|
||||||
|
}
|
||||||
PrintTextCursorX( pSymbol, linerect );
|
PrintTextCursorX( pSymbol, linerect );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1606,7 +1613,10 @@ WORD DrawDisassemblyLine ( int iLine, const WORD nBaseAddress )
|
|||||||
{
|
{
|
||||||
if (bDisasmFormatFlags & DISASM_FORMAT_SYMBOL)
|
if (bDisasmFormatFlags & DISASM_FORMAT_SYMBOL)
|
||||||
{
|
{
|
||||||
DebuggerSetColorFG( DebuggerGetColor( FG_DISASM_SYMBOL ) );
|
if (line.iTargetTable == SYMBOLS_USER_2)
|
||||||
|
DebuggerSetColorFG( DebuggerGetColor( FG_INFO_ADDRESS ) ); // Show user symbols 2 in different color for organization when reverse engineering. Table 1 = known, Table 2 = unknown.
|
||||||
|
else
|
||||||
|
DebuggerSetColorFG( DebuggerGetColor( FG_DISASM_SYMBOL ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -960,6 +960,8 @@ const DisasmData_t* pDisasmData; // If != NULL then bytes are marked up as data
|
|||||||
char sTargetValue [ CHARS_FOR_ADDRESS ];
|
char sTargetValue [ CHARS_FOR_ADDRESS ];
|
||||||
// char sTargetAddress[ CHARS_FOR_ADDRESS ];
|
// char sTargetAddress[ CHARS_FOR_ADDRESS ];
|
||||||
|
|
||||||
|
int iTargetTable; // Which symbol table this appears in if any. See: SYMBOLS_USER_2, DrawDisassemblyLine(), GetDisassemblyLine(), FindSymbolFromAddress()
|
||||||
|
|
||||||
char sImmediateSignedDec[ 6 ]; // "-128" .. "+127"
|
char sImmediateSignedDec[ 6 ]; // "-128" .. "+127"
|
||||||
char sImmediate[ 4 ]; // 'c'
|
char sImmediate[ 4 ]; // 'c'
|
||||||
char nImmediate;
|
char nImmediate;
|
||||||
|
Reference in New Issue
Block a user