MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ldbAddBreakpoint

Function ldbAddBreakpoint

app/redis-6.2.6/src/scripting.c:2088–2095  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

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. */
2088int 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. */

Callers 1

ldbBreakFunction · 0.85

Calls 1

ldbIsBreakpointFunction · 0.85

Tested by

no test coverage detected