Skip to content
Snippets Groups Projects
Commit 89cb9ad3 authored by Timur Safin's avatar Timur Safin Committed by Igor Munkin
Browse files

debugger: swap cmd_up and cmd_down commands

Historically luadebug.lua used `up` and `down` in
a strange order which was inherited from original
debugger.lua implementation. But that was counter
intuitive, and is confusing.

Swap their meaning to be more compatible with
that we accustomed in `gdb`/`lldb`.

NO_DOC=internal
parent 417c6cb7
No related branches found
No related tags found
No related merge requests found
## feature/debugger
* Swapped 'up' and 'down' commands in debugger - to make them behave more
like in `gdb`/`lldb`.
......@@ -81,10 +81,10 @@ local sequence = {
{ ['p ymd'] = 'ymd => false' },
{ ['w'] = 'local hms = false' },
{ ['h'] = dbg_prompt },
{ ['t'] = 'debug-target.lua:5 in chunk at' },
{ ['u'] = 'Already at the top of the stack.' },
{ ['d'] = 'debug-target.lua:5 in chunk at' },
{ ['u'] = 'Inspecting frame: builtin/datetime.lua' },
{ ['t'] = '=> builtin/datetime.lua' },
{ ['u'] = 'debug-target.lua:5 in chunk at' },
{ ['u'] = 'Already at the bottom of the stack.' },
{ ['d'] = 'Inspecting frame: builtin/datetime.lua' },
{ ['l'] = 'obj => {"tzoffset" = "+0300", "hour" = 3}' },
{ ['f'] = dbg_prompt },
{ ['n'] = dbg_prompt },
......
......@@ -419,7 +419,10 @@ local function cmd_eval(code)
return false
end
local function cmd_down()
--[[
Go up the stack. It advances from the callee frame to the caller.
]]
local function cmd_up()
local offset = stack_inspect_offset
local info
......@@ -441,7 +444,10 @@ local function cmd_down()
return false
end
local function cmd_up()
--[[
Go down the stack. It advances from the caller frame to the callee.
]]
local function cmd_down()
local offset = stack_inspect_offset
local info
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment