MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / _BWZ_List

Function _BWZ_List

source/Debugger/Debug.cpp:2186–2240  ·  view source on GitHub ↗

===========================================================================

Source from the content-addressed store, hash-verified

2184
2185//===========================================================================
2186void _BWZ_List ( const Breakpoint_t * aBreakWatchZero, const int iBWZ ) //, bool bZeroBased )
2187{
2188 static const char sEnabledFlags[] = "-E";
2189 static const char sStopFlags[] = "-S";
2190 static const char sTempFlags[] = "-T";
2191 static const char sHitFlags[] = " *";
2192
2193 std::string sAddressBuf;
2194 std::string const& sSymbol = GetSymbol(aBreakWatchZero[iBWZ].nAddress, 2, sAddressBuf);
2195
2196 const char *aMemAccess[5] =
2197 {
2198 "R/W"
2199 ,"R "
2200 ,"W "
2201 ,"Vid"
2202 ," "
2203 };
2204
2205 int iBPM;
2206 switch (aBreakWatchZero[iBWZ].eSource)
2207 {
2208 case BP_SRC_MEM_RW : iBPM = 0; break;
2209 case BP_SRC_MEM_READ_ONLY : iBPM = 1; break;
2210 case BP_SRC_MEM_WRITE_ONLY: iBPM = 2; break;
2211 case BP_SRC_VIDEO_SCANNER : iBPM = 3; break;
2212 default : iBPM = 4; break;
2213 }
2214
2215 std::string fullPrefixAddr = GetFullPrefixAddrForBreakpoint(aBreakWatchZero[iBWZ].addrPrefix, aBreakWatchZero[iBWZ].nAddress, DEVICE_e::DEV_MEMORY, true);
2216 if (aBreakWatchZero[iBWZ].nLength > 1)
2217 {
2218 fullPrefixAddr += ":";
2219 std::string addrEnd = StrFormat(CHC_ADDRESS "%04X", aBreakWatchZero[iBWZ].nAddress + aBreakWatchZero[iBWZ].nLength - 1);
2220 fullPrefixAddr += addrEnd;
2221 }
2222 else
2223 {
2224 fullPrefixAddr += " "; // 5 spaces
2225 }
2226
2227 // ID On Stop Temp HitCounter Prefix/Addr Mem Symbol
2228 ConsolePrintFormat( " #%X %c %c %c %c %08X %s " CHC_INFO "%s" CHC_SYMBOL " %s",
2229// (bZeroBased ? iBWZ + 1 : iBWZ),
2230 iBWZ,
2231 sEnabledFlags[ aBreakWatchZero[ iBWZ ].bEnabled ? 1 : 0 ],
2232 sStopFlags [ aBreakWatchZero[ iBWZ ].bStop ? 1 : 0 ],
2233 sTempFlags [ aBreakWatchZero[ iBWZ ].bTemp ? 1 : 0 ],
2234 sHitFlags [ aBreakWatchZero[ iBWZ ].bHit ? 1 : 0 ],
2235 aBreakWatchZero[ iBWZ ].nHitCount,
2236 fullPrefixAddr.c_str(),
2237 aMemAccess[ iBPM ],
2238 sSymbol.c_str()
2239 );
2240}
2241
2242void _BWZ_ListAll ( const Breakpoint_t * aBreakWatchZero, const int nMax )
2243{

Callers 1

_BWZ_ListAllFunction · 0.85

Calls 3

StrFormatFunction · 0.85
ConsolePrintFormatFunction · 0.85

Tested by

no test coverage detected