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. */
| 2086 | * Returns 1 if the breakpoint was added (or was already set). 0 if there is |
| 2087 | * no space for the breakpoint or if the line is invalid. */ |
| 2088 | int ldbAddBreakpoint(int line) { |
| 2089 | if (line <= 0 || line > ldb.lines) return 0; |
| 2090 | if (!ldbIsBreakpoint(line) && ldb.bpcount != LDB_BREAKPOINTS_MAX) { |
| 2091 | ldb.bp[ldb.bpcount++] = line; |
| 2092 | return 1; |
| 2093 | } |
| 2094 | return 0; |
| 2095 | } |
| 2096 | |
| 2097 | /* Remove the specified breakpoint, returning 1 if the operation was |
| 2098 | * performed or 0 if there was no such breakpoint. */ |
no test coverage detected