| 1750 | } |
| 1751 | |
| 1752 | void 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 | } |
| 1786 | void SuperCalcRun(bool debug) |
| 1787 | { |
| 1788 | if(!runRes.finished) |
no test coverage detected