summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-07-15 10:03:25 +0800
committerruki <[email protected]>2016-07-15 10:03:25 +0800
commit17b66530f4f4f72c4a5783297df77ab493bd5757 (patch)
treed3e557d21ebd41489f660794a28becdee7685f5c
parent58cff8a86ee90990a3fc5c82ec0c9048403350ed (diff)
add debugger for linux
-rwxr-xr-xxmake/actions/build/main.lua2
-rw-r--r--xmake/tools/gdb.lua6
2 files changed, 7 insertions, 1 deletions
diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua
index d8aa2c4a6..bcebbf226 100755
--- a/xmake/actions/build/main.lua
+++ b/xmake/actions/build/main.lua
@@ -86,5 +86,5 @@ function main()
os.cd(olddir)
-- trace
- cprint("${bright}build ok!${ok_hand}")
+ cprint("${bright}build ok!${clear}${ok_hand}")
end
diff --git a/xmake/tools/gdb.lua b/xmake/tools/gdb.lua
index db6b1f707..9bd0bbd46 100644
--- a/xmake/tools/gdb.lua
+++ b/xmake/tools/gdb.lua
@@ -38,6 +38,12 @@ end
-- run the debugged program with arguments
function run(shellname, argv)
+ -- patch arguments
+ table.insert(argv, 1, shellname)
+ table.insert(argv, 1, "--args")
+
+ -- run it
+ os.execv(_g.shellname, argv)
end
-- check the given flags