Debugger: Format changes only (PR #1076)

This commit is contained in:
Kelvin Lee 2022-04-04 03:15:22 +10:00 committed by GitHub
parent b6404e7d96
commit 1bcf371309
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 166 additions and 158 deletions

View File

@ -786,7 +786,6 @@ Update_t CmdProfile (int nArgs)
// Dump to console
if (iParam == PARAM_LIST)
{
char *pText;
char sText[ CONSOLE_WIDTH ];

View File

@ -383,6 +383,7 @@ int GetDisassemblyLine(WORD nBaseAddress, DisasmLine_t& line_)
}
}
else
{
if (iOpmode == AM_M)
{
//sprintf( sTarget, g_aOpmodes[ iOpmode ]._sFormat, (unsigned)nTarget );
@ -399,8 +400,8 @@ int GetDisassemblyLine(WORD nBaseAddress, DisasmLine_t& line_)
bDisasmFormatFlags |= DISASM_FORMAT_CHAR;
line_.nImmediate = (BYTE)nTarget;
unsigned _char = FormatCharTxtCtrl(FormatCharTxtHigh(line_.nImmediate, NULL), NULL);
unsigned _char = FormatCharTxtCtrl(FormatCharTxtHigh(line_.nImmediate, NULL), NULL);
sprintf(line_.sImmediate, "%c", _char);
#if OLD_CONSOLE_COLOR
if (ConsoleColorIsEscapeMeta(_char))
@ -410,6 +411,7 @@ int GetDisassemblyLine(WORD nBaseAddress, DisasmLine_t& line_)
#endif
}
}
}
sprintf(line_.sAddress, "%04X", nBaseAddress);
@ -575,6 +577,8 @@ void FormatNopcodeBytes(WORD nBaseAddress, DisasmLine_t& line_)
strncpy(pDst, (const char*)(mem + nBaseAddress), iByte);
pDst += iByte;
*pDst = 0;
break;
case NOP_STRING_APPLE:
iByte = line_.nOpbyte; // handle all bytes of text
pSrc = (const char*)mem + nStartAddress;
@ -660,13 +664,17 @@ void FormatDisassemblyLine(const DisasmLine_t& line, char* sDisassembly, const i
strcat( sDisassembly, ", Y" );
}
*/
char sTarget[32];
if (line.bTargetValue || line.bTargetRelative || line.bTargetImmediate)
{
if (line.bTargetRelative)
{
strcpy(sTarget, line.sTargetValue);
}
else
{
if (line.bTargetImmediate)
{
strcat(sDisassembly, "#");
@ -675,6 +683,7 @@ void FormatDisassemblyLine(const DisasmLine_t& line, char* sDisassembly, const i
}
else
sprintf(sTarget, g_aOpmodes[line.iOpmode].m_sFormat, line.nTarget);
}
strcat(sDisassembly, "$");
strcat(sDisassembly, sTarget);