* Tracer: fixed RTS padding
* Tracer: always force Trace Logger update when a breakpoint is hit * Debugger: always open Debugger window when a breakpoint is hit
This commit is contained in:
parent
f22dc51e71
commit
7b99bfc321
|
@ -633,7 +633,10 @@ bool inDebugger = false;
|
||||||
void FCEUD_DebugBreakpoint(int bp_num)
|
void FCEUD_DebugBreakpoint(int bp_num)
|
||||||
{
|
{
|
||||||
// log the Breakpoint Hit into Trace Logger log if needed
|
// log the Breakpoint Hit into Trace Logger log if needed
|
||||||
if (logging && (logging_options & LOG_MESSAGES))
|
if (logging)
|
||||||
|
{
|
||||||
|
log_old_emu_paused = false; // force Trace Logger update
|
||||||
|
if (logging_options & LOG_MESSAGES)
|
||||||
{
|
{
|
||||||
char str_temp[500];
|
char str_temp[500];
|
||||||
if (bp_num >= 0)
|
if (bp_num >= 0)
|
||||||
|
@ -657,8 +660,9 @@ void FCEUD_DebugBreakpoint(int bp_num)
|
||||||
OutputLogLine(str_temp);
|
OutputLogLine(str_temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpdateDebugger(true);
|
DoDebug(0);
|
||||||
UpdateOtherDebuggingDialogs(); // Keeps the debugging windows updating smoothly when stepping
|
UpdateOtherDebuggingDialogs(); // Keeps the debugging windows updating smoothly when stepping
|
||||||
|
|
||||||
if (bp_num >= 0)
|
if (bp_num >= 0)
|
||||||
|
|
|
@ -455,16 +455,16 @@ void FCEUD_TraceInstruction(uint8 *opcode, int size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size == 1 && GetMem(addr - 1) == 0x60)
|
if (size == 1 && GetMem(addr) == 0x60)
|
||||||
{
|
{
|
||||||
// special case: an RTS opcode
|
// special case: an RTS opcode
|
||||||
// add "----------" to emphasize the end of subroutine
|
// add "----------" to emphasize the end of subroutine
|
||||||
strcat(str_disassembly, " ");
|
strcat(str_disassembly, " ");
|
||||||
for (int i = strlen(str_disassembly); i < (LOG_DISASSEMBLY_MAX_LEN - 1); ++i)
|
int i = strlen(str_disassembly);
|
||||||
|
for (; i < (LOG_DISASSEMBLY_MAX_LEN - 2); ++i)
|
||||||
str_disassembly[i] = '-';
|
str_disassembly[i] = '-';
|
||||||
str_disassembly[LOG_DISASSEMBLY_MAX_LEN - 1] = 0;
|
str_disassembly[i] = 0;
|
||||||
} else
|
}
|
||||||
{
|
|
||||||
// stretch the disassembly string out if we have to output other stuff.
|
// stretch the disassembly string out if we have to output other stuff.
|
||||||
if ((logging_options & (LOG_REGISTERS|LOG_PROCESSOR_STATUS)) && !(logging_options & LOG_TO_THE_LEFT))
|
if ((logging_options & (LOG_REGISTERS|LOG_PROCESSOR_STATUS)) && !(logging_options & LOG_TO_THE_LEFT))
|
||||||
{
|
{
|
||||||
|
@ -472,7 +472,6 @@ void FCEUD_TraceInstruction(uint8 *opcode, int size)
|
||||||
str_disassembly[i] = ' ';
|
str_disassembly[i] = ' ';
|
||||||
str_disassembly[LOG_DISASSEMBLY_MAX_LEN - 1] = 0;
|
str_disassembly[LOG_DISASSEMBLY_MAX_LEN - 1] = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Start filling the str_temp line: Frame number, AXYS state, Processor status, Tabs, Address, Data, Disassembly
|
// Start filling the str_temp line: Frame number, AXYS state, Processor status, Tabs, Address, Data, Disassembly
|
||||||
if (logging_options & LOG_FRAME_NUMBER)
|
if (logging_options & LOG_FRAME_NUMBER)
|
||||||
|
|
Loading…
Reference in New Issue