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

Function ldbList

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

Implement the "list" command of the Lua debugger. If around is 0 * the whole file is listed, otherwise only a small portion of the file * around the specified line is shown. When a line number is specified * the amount of context (lines before/after) is specified via the * 'context' argument. */

Source from the content-addressed store, hash-verified

2190 * the amount of context (lines before/after) is specified via the
2191 * 'context' argument. */
2192void ldbList(int around, int context) {
2193 int j;
2194
2195 for (j = 1; j <= ldb.lines; j++) {
2196 if (around != 0 && abs(around-j) > context) continue;
2197 ldbLogSourceLine(j);
2198 }
2199}
2200
2201/* Append a human readable representation of the Lua value at position 'idx'
2202 * on the stack of the 'lua' state, to the SDS string passed as argument.

Callers 2

ldbBreakFunction · 0.85
ldbReplFunction · 0.85

Calls 2

absFunction · 0.85
ldbLogSourceLineFunction · 0.85

Tested by

no test coverage detected