Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
f4805800
Commit
f4805800
authored
Nov 11, 2015
by
antirez
Browse files
Lua debugger: print now handles ARGV and KEYS.
parent
36392dd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
f4805800
...
...
@@ -1881,7 +1881,15 @@ void ldbPrint(lua_State *lua, char *varname) {
}
}
}
ldbLog
(
sdsnew
(
"No such variable."
));
/* Let's try with global vars in two selected cases */
if
(
!
strcmp
(
varname
,
"ARGV"
)
||
!
strcmp
(
varname
,
"KEYS"
))
{
lua_getglobal
(
lua
,
varname
);
ldbLogStackValue
(
lua
,
"<value> "
);
lua_pop
(
lua
,
1
);
}
else
{
ldbLog
(
sdsnew
(
"No such variable."
));
}
}
/* Implements the break command to list, add and remove breakpoints. */
...
...
@@ -1982,7 +1990,7 @@ ldbLog(sdsnew("[n]ext Alias for step."));
ldbLog
(
sdsnew
(
"[c]continue Run till next breakpoint."
));
ldbLog
(
sdsnew
(
"[l]list [line] List source code, around [line] if specified"
));
ldbLog
(
sdsnew
(
" you can use another arg for context size."
));
ldbLog
(
sdsnew
(
"[p]rint <var> Show the value of the specified
local
variable."
));
ldbLog
(
sdsnew
(
"[p]rint <var> Show the value of the specified variable."
));
ldbLog
(
sdsnew
(
"[b]eark Show all breakpoints."
));
ldbLog
(
sdsnew
(
"[b]eark <line> Add a breakpoint to the specified line."
));
ldbLog
(
sdsnew
(
"[b]eark -<line> Remove breakpoint from the specified line."
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment