--- hatari/src/debug/debugdsp.c 2019/04/09 08:50:22 1.1.1.3 +++ hatari/src/debug/debugdsp.c 2019/04/09 08:52:00 1.1.1.4 @@ -22,6 +22,7 @@ const char DebugDsp_fileid[] = "Hatari d #include "dsp.h" #include "evaluate.h" #include "history.h" +#include "log.h" #include "memorySnapShot.h" #include "profile.h" #include "str.h" @@ -118,24 +119,9 @@ error_msg: */ static void DebugDsp_ShowAddressInfo(Uint16 addr) { - Uint32 count, cycles; - const char *symbol; - bool shown = false; - - symbol = Symbols_GetByDspAddress(addr); + const char *symbol = Symbols_GetByDspAddress(addr); if (symbol) - { - fprintf(debugOutput, "%s", symbol); - shown = true; - } - if (Profile_DspAddressData(addr, &count, &cycles)) - { - fprintf(debugOutput, "%s%d/%d times/cycles", - (shown ? ", " : ""), count, cycles); - shown = true; - } - if (shown) - fprintf(debugOutput, ":\n"); + fprintf(debugOutput, "%s:\n", symbol); } @@ -345,7 +331,10 @@ void DebugDsp_Check(void) { Profile_DspUpdate(); } - /* TODO: show symbols while disassembling DSP instructions */ + if (LOG_TRACE_LEVEL((TRACE_DSP_DISASM|TRACE_DSP_SYMBOLS))) + { + DebugDsp_ShowAddressInfo(DSP_GetPC()); + } if (nDspActiveCBs) { if (BreakCond_MatchDsp()) @@ -374,7 +363,8 @@ void DebugDsp_SetDebugging(void) bDspProfiling = Profile_DspStart(); nDspActiveCBs = BreakCond_BreakPointCount(true); - if (nDspActiveCBs || nDspSteps || bDspProfiling || bHistoryEnabled) + if (nDspActiveCBs || nDspSteps || bDspProfiling || bHistoryEnabled + || LOG_TRACE_LEVEL((TRACE_DSP_DISASM|TRACE_DSP_SYMBOLS))) DSP_SetDebugging(true); else DSP_SetDebugging(false);