diff options
Diffstat (limited to 'xmake/modules/devel/debugger/run.lua')
| -rw-r--r-- | xmake/modules/devel/debugger/run.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/xmake/modules/devel/debugger/run.lua b/xmake/modules/devel/debugger/run.lua index e5cb31b6c..60e2b7b5a 100644 --- a/xmake/modules/devel/debugger/run.lua +++ b/xmake/modules/devel/debugger/run.lua @@ -310,6 +310,23 @@ function _run_raddbg(program, argv, opt) return true end +-- run nnd +function _run_nnd(program, argv, opt) + opt = opt or {} + local nnd = find_tool("nnd", {program = config.get("debugger")}) + if not nnd then + return false + end + + -- patch arguments + argv = argv or {} + table.insert(argv, 1, program) + + -- run it + os.execv(nnd.program, argv, table.join(opt, {exclusive = true})) + return true +end + -- run program with debugger -- -- @param program the program name @@ -339,6 +356,11 @@ function main(program, argv, opt) } -- for windows target or on windows? + if (config.plat() or os.host()) == "linux" then + table.insert(debuggers, 1, {"nnd", _run_nnd}) + end + + -- for windows target or on windows? if (config.plat() or os.host()) == "windows" then table.insert(debuggers, 1, {"windbg", _run_windbg}) table.insert(debuggers, 1, {"ollydbg", _run_ollydbg}) |
