MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ldbAddBreakpoint

Function ldbAddBreakpoint

src/scripting.cpp:2110–2117  ·  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

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

Callers 1

ldbBreakFunction · 0.85

Calls 1

ldbIsBreakpointFunction · 0.85

Tested by

no test coverage detected