MCPcopy Create free account
hub / github.com/WheretIB/nullc / SuperCalcSetBreakpoints

Function SuperCalcSetBreakpoints

SuperCalc.cpp:1752–1785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1750}
1751
1752void SuperCalcSetBreakpoints()
1753{
1754 nullcDebugClearBreakpoints();
1755 unsigned int infoSize = 0;
1756 NULLCCodeInfo *codeInfo = nullcDebugCodeInfo(&infoSize);
1757
1758 const char *fullSource = nullcDebugSource();
1759
1760 unsigned int moduleSize = 0;
1761 ExternModuleInfo *modules = nullcDebugModuleInfo(&moduleSize);
1762 // Set all breakpoints
1763 for(unsigned int i = 0; i < richEdits.size(); i++)
1764 {
1765 RichTextarea::LineIterator it = RichTextarea::GetFirstLine(richEdits[i]);
1766 while(it.line)
1767 {
1768 if(it.GetExtra())
1769 {
1770 unsigned int matches = ConvertLineToInstruction(RichTextarea::GetCachedAreaText(richEdits[i]), it.number, fullSource, infoSize, codeInfo, moduleSize, modules);
1771 for(unsigned k = 0; k < matches; k++)
1772 {
1773 it.SetExtra(EXTRA_BREAKPOINT);
1774 nullcDebugAddBreakpoint(byteCodePos[k]);
1775 }
1776 if(!matches)
1777 {
1778 it.SetExtra(EXTRA_BREAKPOINT_INVALID);
1779 printf("Failed to add breakpoint at line %d\r\n", it.number);
1780 }
1781 }
1782 it.GoForward();
1783 }
1784 }
1785}
1786void SuperCalcRun(bool debug)
1787{
1788 if(!runRes.finished)

Callers 1

SuperCalcRunFunction · 0.85

Calls 10

nullcDebugCodeInfoFunction · 0.85
nullcDebugSourceFunction · 0.85
nullcDebugModuleInfoFunction · 0.85
ConvertLineToInstructionFunction · 0.85
nullcDebugAddBreakpointFunction · 0.85
GetExtraMethod · 0.80
SetExtraMethod · 0.80
GoForwardMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected