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

Function ldbList

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

2213 * the amount of context (lines before/after) is specified via the
2214 * 'context' argument. */
2215void ldbList(int around, int context) {
2216 int j;
2217
2218 for (j = 1; j <= ldb.lines; j++) {
2219 if (around != 0 && abs(around-j) > context) continue;
2220 ldbLogSourceLine(j);
2221 }
2222}
2223
2224/* Append a human readable representation of the Lua value at position 'idx'
2225 * on the stack of the 'lua' state, to the SDS string passed as argument.

Callers 2

ldbBreakFunction · 0.85
ldbReplFunction · 0.85

Calls 1

ldbLogSourceLineFunction · 0.85

Tested by

no test coverage detected