Add the specified breakpoint. Ignore it if we already reached the max. * Returns 1 if the breakpoint was added (or was already set). 0 if there is * no space for the breakpoint or if the line is invalid. */
| 2108 | * Returns 1 if the breakpoint was added (or was already set). 0 if there is |
| 2109 | * no space for the breakpoint or if the line is invalid. */ |
| 2110 | int ldbAddBreakpoint(int line) { |
| 2111 | if (line <= 0 || line > ldb.lines) return 0; |
| 2112 | if (!ldbIsBreakpoint(line) && ldb.bpcount != LDB_BREAKPOINTS_MAX) { |
| 2113 | ldb.bp[ldb.bpcount++] = line; |
| 2114 | return 1; |
| 2115 | } |
| 2116 | return 0; |
| 2117 | } |
| 2118 | |
| 2119 | /* Remove the specified breakpoint, returning 1 if the operation was |
| 2120 | * performed or 0 if there was no such breakpoint. */ |
no test coverage detected