diff options
| author | Gaweringo <[email protected]> | 2025-01-31 22:52:46 +0100 |
|---|---|---|
| committer | Gaweringo <[email protected]> | 2025-01-31 22:52:46 +0100 |
| commit | 9afa188316f3a94e70f7643dc3ea41d46df8f03e (patch) | |
| tree | 310d198966df5d342053b21c37ff73e5daf7c497 /xmake/modules/devel/debugger/run.lua | |
| parent | 1c95d287f8bf7b80afc30e68ceb7f438afcccb7a (diff) | |
feat(debugger): add raddbg as a debugger option
Diffstat (limited to 'xmake/modules/devel/debugger/run.lua')
| -rw-r--r-- | xmake/modules/devel/debugger/run.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/xmake/modules/devel/debugger/run.lua b/xmake/modules/devel/debugger/run.lua index 29c3f8c45..09d8641c8 100644 --- a/xmake/modules/devel/debugger/run.lua +++ b/xmake/modules/devel/debugger/run.lua @@ -32,6 +32,7 @@ import("detect.tools.find_ollydbg") import("detect.tools.find_devenv") import("detect.tools.find_vsjitdebugger") import("detect.tools.find_renderdoc") +import("detect.tools.find_raddbg") import("lib.detect.find_tool") import("private.action.run.runenvs") @@ -330,6 +331,25 @@ function _run_seergdb(program, argv, opt) return true end +-- run rad debugger +function _run_raddbg(program, argv, opt) + + -- find raddbg + opt = opt or {} + local raddbg = find_raddbg({program = config.get("debugger")}) + if not raddbg then + return false + end + + -- patch arguments + argv = argv or {} + table.insert(argv, 1, program) + + -- run it + os.execv(raddbg, argv, table.join(opt, {exclusive = true})) + return true +end + -- run program with debugger -- -- @param program the program name @@ -365,6 +385,7 @@ function main(program, argv, opt) table.insert(debuggers, 1, {"x64dbg", _run_x64dbg}) table.insert(debuggers, 1, {"vsjitdebugger", _run_vsjitdebugger}) table.insert(debuggers, 1, {"devenv", _run_devenv}) + table.insert(debuggers, 1, {"raddbg", _run_raddbg}) end -- get debugger from configuration |
