summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-29 22:12:48 +0800
committerruki <[email protected]>2017-05-29 22:12:48 +0800
commitaf5040e4c197ce261062b925743201358dc5e43c (patch)
treed67339b77b9ac1bb4e26c0a8d7607389a32483d7
parent3e8ade50a1bab7031860b3ae6615c828ee1fd448 (diff)
add find lldb, gdb modules and rewrite debugger
-rw-r--r--xmake/actions/config/xmake.lua2
-rw-r--r--xmake/actions/global/xmake.lua4
-rw-r--r--xmake/actions/run/main.lua10
-rw-r--r--xmake/core/tool/debugger.lua88
-rw-r--r--xmake/modules/detect/tool/find_gdb.lua (renamed from xmake/core/sandbox/modules/import/core/tool/debugger.lua)53
-rw-r--r--xmake/modules/detect/tool/find_lldb.lua (renamed from xmake/tools/lldb.lua)63
-rw-r--r--xmake/modules/detect/tool/find_ollydbg.lua61
-rw-r--r--xmake/modules/detect/tool/find_vsjitdebugger.lua61
-rw-r--r--xmake/modules/detect/tool/find_windbg.lua (renamed from xmake/tools/ollydbg.lua)58
-rw-r--r--xmake/modules/detect/tool/find_x64dbg.lua (renamed from xmake/tools/gdb.lua)62
-rw-r--r--xmake/modules/devel/debugger/run.lua215
-rw-r--r--xmake/platforms/iphoneos/check.lua1
-rw-r--r--xmake/platforms/linux/check.lua2
-rw-r--r--xmake/platforms/macosx/check.lua1
-rw-r--r--xmake/platforms/watchos/check.lua1
-rw-r--r--xmake/tools/vsjitdebugger.lua53
-rw-r--r--xmake/tools/windbg.lua53
17 files changed, 472 insertions, 316 deletions
diff --git a/xmake/actions/config/xmake.lua b/xmake/actions/config/xmake.lua
index afa8445de..2f05ee183 100644
--- a/xmake/actions/config/xmake.lua
+++ b/xmake/actions/config/xmake.lua
@@ -123,7 +123,7 @@ task("config")
, " - sdk/include" }
, {}
- , {nil, "dg", "kv", "auto", "The Debugger" }
+ , {nil, "debugger", "kv", "auto", "The Debugger" }
-- show language menu options
, function ()
diff --git a/xmake/actions/global/xmake.lua b/xmake/actions/global/xmake.lua
index 4af28342f..67058a4c0 100644
--- a/xmake/actions/global/xmake.lua
+++ b/xmake/actions/global/xmake.lua
@@ -45,7 +45,7 @@ task("global")
-- options
, options =
{
- {'c', "clean", "k", nil, "Clean the cached configure and configure all again." }
+ {'c', "clean", "k", nil, "Clean the cached configure and configure all again." }
, {}
@@ -54,7 +54,7 @@ task("global")
, " --ccache=[y|n]" }
, {}
- , {nil, "dg", "kv", "auto", "The Debugger" }
+ , {nil, "debugger", "kv", "auto", "The Debugger" }
, {}
-- show platform menu options
diff --git a/xmake/actions/run/main.lua b/xmake/actions/run/main.lua
index f7664f1fb..c87c12b70 100644
--- a/xmake/actions/run/main.lua
+++ b/xmake/actions/run/main.lua
@@ -29,10 +29,10 @@ import("core.project.config")
import("core.project.global")
import("core.project.project")
import("core.platform.platform")
-import("core.tool.debugger")
+import("devel.debugger")
-- run target
-function _run_target(target)
+function _on_run_target(target)
-- get kind
if target:targetkind() == "binary" then
@@ -56,9 +56,9 @@ function _run(target)
-- the target scripts
local scripts =
{
- target:get("run_before")
- , target:get("run") or _run_target
- , target:get("run_after")
+ target:script("run_before")
+ , target:script("run") or _on_run_target
+ , target:script("run_after")
}
-- run the target scripts
diff --git a/xmake/core/tool/debugger.lua b/xmake/core/tool/debugger.lua
deleted file mode 100644
index a906b7371..000000000
--- a/xmake/core/tool/debugger.lua
+++ /dev/null
@@ -1,88 +0,0 @@
---!The Make-like Build Utility based on Lua
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership. The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
---
--- @author ruki
--- @file debugger.lua
---
-
--- define module
-local debugger = debugger or {}
-
--- load modules
-local io = require("base/io")
-local path = require("base/path")
-local utils = require("base/utils")
-local table = require("base/table")
-local string = require("base/string")
-local config = require("project/config")
-local sandbox = require("sandbox/sandbox")
-local platform = require("platform/platform")
-local tool = require("tool/tool")
-
--- get the current tool
-function debugger:_tool()
-
- -- get it
- return self._TOOL
-end
-
--- load the debugger
-function debugger.load()
-
- -- get it directly from cache dirst
- if debugger._INSTANCE then
- return debugger._INSTANCE
- end
-
- -- new instance
- local instance = table.inherit(debugger)
-
- -- load the debugger tool
- local result, errors = tool.load("dg")
- if not result then
- return nil, errors
- end
-
- -- save tool
- instance._TOOL = result
-
- -- save this instance
- debugger._INSTANCE = instance
-
- -- ok
- return instance
-end
-
--- get properties of the tool
-function debugger:get(name)
-
- -- get it
- return self:_tool().get(name)
-end
-
--- run the debugged program with arguments
-function debugger:run(shellname, argv)
-
- -- run it
- return sandbox.load(self:_tool().run, shellname, argv)
-end
-
--- return module
-return debugger
diff --git a/xmake/core/sandbox/modules/import/core/tool/debugger.lua b/xmake/modules/detect/tool/find_gdb.lua
index bd6a86616..37b84e647 100644
--- a/xmake/core/sandbox/modules/import/core/tool/debugger.lua
+++ b/xmake/modules/detect/tool/find_gdb.lua
@@ -19,32 +19,41 @@
-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
--
-- @author ruki
--- @file debugger.lua
+-- @file find_gdb.lua
--
--- define module
-local sandbox_core_tool_debugger = sandbox_core_tool_debugger or {}
+-- imports
+import("lib.detect.find_program")
+import("lib.detect.find_programver")
--- load modules
-local platform = require("platform/platform")
-local debugger = require("tool/debugger")
-local raise = require("sandbox/modules/raise")
+-- find gdb
+--
+-- @param opt the argument options, .e.g {version = true, program="/usr/bin/gdb"}
+--
+-- @return program, version
+--
+-- @code
+--
+-- local gdb = find_gdb()
+-- local gdb, version = find_gdb({version = true})
+-- local gdb, version = find_gdb({version = true, program = "/usr/bin/gdb"})
+--
+-- @endcode
+--
+function main(opt)
--- run the debugged program with arguments
-function sandbox_core_tool_debugger.run(shellname, argv)
-
- -- get the debugger instance
- local instance, errors = debugger.load()
- if not instance then
- raise(errors)
- end
+ -- init options
+ opt = opt or {}
+
+ -- find program
+ local program = find_program(opt.program or "gdb", { "/usr/bin", "/usr/local/bin"})
- -- extract it
- local ok, errors = instance:run(shellname, argv)
- if not ok then
- raise(errors)
+ -- find program version
+ local version = nil
+ if program and opt and opt.version then
+ version = find_programver(program)
end
-end
--- return module
-return sandbox_core_tool_debugger
+ -- ok?
+ return program, version
+end
diff --git a/xmake/tools/lldb.lua b/xmake/modules/detect/tool/find_lldb.lua
index 8948ed39c..32d4ff735 100644
--- a/xmake/tools/lldb.lua
+++ b/xmake/modules/detect/tool/find_lldb.lua
@@ -19,44 +19,41 @@
-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
--
-- @author ruki
--- @file lldb.lua
+-- @file find_lldb.lua
--
--- init it
-function init(shellname)
+-- imports
+import("lib.detect.find_program")
+import("lib.detect.find_programver")
- -- save name
- _g.shellname = shellname or "lldb"
-
-end
-
--- get the property
-function get(name)
-
- -- get it
- return _g[name]
-end
-
--- run the debugged program with arguments
-function run(shellname, argv)
+-- find lldb
+--
+-- @param opt the argument options, .e.g {version = true, program="/usr/bin/lldb"}
+--
+-- @return program, version
+--
+-- @code
+--
+-- local lldb = find_lldb()
+-- local lldb, version = find_lldb({version = true})
+-- local lldb, version = find_lldb({version = true, program = "/usr/bin/lldb"})
+--
+-- @endcode
+--
+function main(opt)
- -- attempt to split shellname, .e.g xcrun -sdk macosx lldb
- local shellnames = _g.shellname:split("%s")
+ -- init options
+ opt = opt or {}
+
+ -- find program
+ local program = find_program(opt.program or "lldb", { "/usr/bin", "/usr/local/bin"})
- -- patch arguments
- argv = argv or {}
- table.insert(argv, 1, shellname)
- for i = #shellnames, 2, -1 do
- table.insert(argv, 1, shellnames[i])
+ -- find program version
+ local version = nil
+ if program and opt and opt.version then
+ version = find_programver(program)
end
- -- run it
- os.execv(shellnames[1], argv)
-end
-
--- check the given flags
-function check(flags)
-
- -- check it
- os.run("%s %s -h", _g.shellname, ifelse(flags, flags, ""))
+ -- ok?
+ return program, version
end
diff --git a/xmake/modules/detect/tool/find_ollydbg.lua b/xmake/modules/detect/tool/find_ollydbg.lua
new file mode 100644
index 000000000..0075e9eb8
--- /dev/null
+++ b/xmake/modules/detect/tool/find_ollydbg.lua
@@ -0,0 +1,61 @@
+--!The Make-like Build Utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file find_ollydbg.lua
+--
+
+-- imports
+import("lib.detect.find_program")
+import("lib.detect.find_programver")
+
+-- find ollydbg
+--
+-- @param opt the argument options, .e.g {version = true, program = "c:\xxx\ollydbg.exe"}
+--
+-- @return program, version
+--
+-- @code
+--
+-- local ollydbg = find_ollydbg()
+-- local ollydbg, version = find_ollydbg({version = true})
+-- local ollydbg, version = find_ollydbg({version = true, program = "c:\xxx\ollydbg.exe"})
+--
+-- @endcode
+--
+function main(opt)
+
+ -- not on windows?
+ if os.host() ~= "windows" then
+ return
+ end
+
+ -- find program, TODO from winreg
+ local program = find_program(opt.program or "ollydbg", {})
+
+ -- find program version
+ local version = nil
+ if program and opt and opt.version then
+ version = find_programver(program)
+ end
+
+ -- ok?
+ return program, version
+end
diff --git a/xmake/modules/detect/tool/find_vsjitdebugger.lua b/xmake/modules/detect/tool/find_vsjitdebugger.lua
new file mode 100644
index 000000000..bc7b12144
--- /dev/null
+++ b/xmake/modules/detect/tool/find_vsjitdebugger.lua
@@ -0,0 +1,61 @@
+--!The Make-like Build Utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file find_vsjitdebugger.lua
+--
+
+-- imports
+import("lib.detect.find_program")
+import("lib.detect.find_programver")
+
+-- find vsjitdebugger
+--
+-- @param opt the argument options, .e.g {version = true, program = "c:\xxx\vsjitdebugger.exe"}
+--
+-- @return program, version
+--
+-- @code
+--
+-- local vsjitdebugger = find_vsjitdebugger()
+-- local vsjitdebugger, version = find_vsjitdebugger({version = true})
+-- local vsjitdebugger, version = find_vsjitdebugger({version = true, program = "c:\xxx\vsjitdebugger.exe"})
+--
+-- @endcode
+--
+function main(opt)
+
+ -- not on windows?
+ if os.host() ~= "windows" then
+ return
+ end
+
+ -- find program, TODO from winreg
+ local program = find_program(opt.program or "vsjitdebugger", {})
+
+ -- find program version
+ local version = nil
+ if program and opt and opt.version then
+ version = find_programver(program)
+ end
+
+ -- ok?
+ return program, version
+end
diff --git a/xmake/tools/ollydbg.lua b/xmake/modules/detect/tool/find_windbg.lua
index 866b21ba9..89d9e2563 100644
--- a/xmake/tools/ollydbg.lua
+++ b/xmake/modules/detect/tool/find_windbg.lua
@@ -19,35 +19,43 @@
-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
--
-- @author ruki
--- @file ollydbg.lua
+-- @file find_windbg.lua
--
--- init it
-function init(shellname)
+-- imports
+import("lib.detect.find_program")
+import("lib.detect.find_programver")
- -- save name
- _g.shellname = shellname or "ollydbg"
-
-end
-
--- get the property
-function get(name)
-
- -- get it
- return _g[name]
-end
-
--- run the debugged program with arguments
-function run(shellname, argv)
+-- find windbg
+--
+-- @param opt the argument options, .e.g {version = true, program = "c:\xxx\windbg.exe"}
+--
+-- @return program, version
+--
+-- @code
+--
+-- local windbg = find_windbg()
+-- local windbg, version = find_windbg({version = true})
+-- local windbg, version = find_windbg({version = true, program = "c:\xxx\windbg.exe"})
+--
+-- @endcode
+--
+function main(opt)
- -- patch arguments
- argv = argv or {}
- table.insert(argv, 1, shellname)
+ -- not on windows?
+ if os.host() ~= "windows" then
+ return
+ end
+
+ -- find program, TODO from winreg
+ local program = find_program(opt.program or "windbg", {})
- -- run it
- os.execv(_g.shellname, argv)
-end
+ -- find program version
+ local version = nil
+ if program and opt and opt.version then
+ version = find_programver(program)
+ end
--- check the given flags
-function check(flags)
+ -- ok?
+ return program, version
end
diff --git a/xmake/tools/gdb.lua b/xmake/modules/detect/tool/find_x64dbg.lua
index 2932a3454..be6c73155 100644
--- a/xmake/tools/gdb.lua
+++ b/xmake/modules/detect/tool/find_x64dbg.lua
@@ -19,39 +19,43 @@
-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
--
-- @author ruki
--- @file gdb.lua
+-- @file find_x64dbg.lua
--
--- init it
-function init(shellname)
+-- imports
+import("lib.detect.find_program")
+import("lib.detect.find_programver")
- -- save name
- _g.shellname = shellname or "gdb"
-
-end
-
--- get the property
-function get(name)
-
- -- get it
- return _g[name]
-end
-
--- run the debugged program with arguments
-function run(shellname, argv)
-
- -- patch arguments
- argv = argv or {}
- table.insert(argv, 1, shellname)
- table.insert(argv, 1, "--args")
+-- find x64dbg
+--
+-- @param opt the argument options, .e.g {version = true, program = "c:\xxx\x64dbg.exe"}
+--
+-- @return program, version
+--
+-- @code
+--
+-- local x64dbg = find_x64dbg()
+-- local x64dbg, version = find_x64dbg({version = true})
+-- local x64dbg, version = find_x64dbg({version = true, program = "c:\xxx\x64dbg.exe"})
+--
+-- @endcode
+--
+function main(opt)
- -- run it
- os.execv(_g.shellname, argv)
-end
+ -- not on windows?
+ if os.host() ~= "windows" then
+ return
+ end
+
+ -- find program, TODO from winreg
+ local program = find_program(opt.program or "x64dbg", {})
--- check the given flags
-function check(flags)
+ -- find program version
+ local version = nil
+ if program and opt and opt.version then
+ version = find_programver(program)
+ end
- -- check it
- os.run("%s %s -h", _g.shellname, ifelse(flags, flags, ""))
+ -- ok?
+ return program, version
end
diff --git a/xmake/modules/devel/debugger/run.lua b/xmake/modules/devel/debugger/run.lua
new file mode 100644
index 000000000..a94f7852f
--- /dev/null
+++ b/xmake/modules/devel/debugger/run.lua
@@ -0,0 +1,215 @@
+--!The Make-like Build Utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file run.lua
+--
+
+-- imports
+import("core.base.option")
+import("core.project.config")
+import("detect.tool.find_gdb")
+import("detect.tool.find_lldb")
+import("detect.tool.find_windbg")
+import("detect.tool.find_x64dbg")
+import("detect.tool.find_ollydbg")
+import("detect.tool.find_vsjitdebugger")
+
+-- run gdb
+function _run_gdb(program, argv)
+
+ -- find gdb
+ local gdb = find_gdb({program = config.get("debugger")})
+ if not gdb then
+ return false
+ end
+
+ -- patch arguments
+ argv = argv or {}
+ table.insert(argv, 1, program)
+ table.insert(argv, 1, "--args")
+
+ -- run it
+ os.execv(gdb, argv)
+
+ -- ok
+ return true
+end
+
+-- run lldb
+function _run_lldb(program, argv)
+
+ -- find lldb
+ local lldb = find_lldb({program = config.get("debugger")})
+ if not lldb then
+ return false
+ end
+
+ -- attempt to split shellname, .e.g xcrun -sdk macosx lldb
+ local shellnames = lldb:split("%s")
+
+ -- patch arguments
+ argv = argv or {}
+ table.insert(argv, 1, program)
+ for i = #shellnames, 2, -1 do
+ table.insert(argv, 1, shellnames[i])
+ end
+
+ -- run it
+ os.execv(shellnames[1], argv)
+
+ -- ok
+ return true
+end
+
+-- run windbg
+function _run_windbg(program, argv)
+
+ -- find windbg
+ local windbg = find_windbg({program = config.get("debugger")})
+ if not windbg then
+ return false
+ end
+
+ -- patch arguments
+ argv = argv or {}
+ table.insert(argv, 1, program)
+
+ -- run it
+ os.execv(windbg, argv)
+
+ -- ok
+ return true
+end
+
+-- run x64dbg
+function _run_x64dbg(program, argv)
+
+ -- find x64dbg
+ local x64dbg = find_x64dbg({program = config.get("debugger")})
+ if not x64dbg then
+ return false
+ end
+
+ -- patch arguments
+ argv = argv or {}
+ table.insert(argv, 1, program)
+
+ -- run it
+ os.execv(x64dbg, argv)
+
+ -- ok
+ return true
+end
+
+-- run ollydbg
+function _run_ollydbg(program, argv)
+
+ -- find ollydbg
+ local ollydbg = find_ollydbg({program = config.get("debugger")})
+ if not ollydbg then
+ return false
+ end
+
+ -- patch arguments
+ argv = argv or {}
+ table.insert(argv, 1, program)
+
+ -- run it
+ os.execv(ollydbg, argv)
+
+ -- ok
+ return true
+end
+
+-- run vsjitdebugger
+function _run_vsjitdebugger(program, argv)
+
+ -- find vsjitdebugger
+ local vsjitdebugger = find_vsjitdebugger({program = config.get("debugger")})
+ if not vsjitdebugger then
+ return false
+ end
+
+ -- patch arguments
+ argv = argv or {}
+ table.insert(argv, 1, program)
+
+ -- run it
+ os.execv(vsjitdebugger, argv)
+
+ -- ok
+ return true
+end
+
+-- run program with debugger
+--
+-- @param program the program name
+-- @param argv the program rguments
+--
+-- @code
+--
+-- import("devel.debugger")
+--
+-- debugger.run("test")
+-- debugger.run("echo", {"hello xmake!"})
+--
+-- @endcode
+--
+function main(program, argv)
+
+ -- init debuggers
+ local debuggers =
+ {
+ {"lldb", _run_lldb}
+ , {"gdb", _run_gdb}
+ }
+
+ -- 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})
+ table.insert(debuggers, 1, {"x64dbg", _run_x64dbg})
+ table.insert(debuggers, 1, {"vsjitdebugger", _run_vsjitdebugger})
+ end
+
+ -- get debugger from the configure
+ local debugger = config.get("debugger")
+ if debugger then
+ debugger = debugger:lower()
+ for _, _debugger in ipairs(debuggers) do
+ if debugger:find(_debugger[1]) then
+ if _debugger[2](program, argv) then
+ return
+ end
+ end
+ end
+ else
+ -- run debugger
+ for _, _debugger in ipairs(debuggers) do
+ if _debugger[2](program, argv) then
+ return
+ end
+ end
+ end
+
+ -- no debugger
+ raise("debugger not found!")
+end
diff --git a/xmake/platforms/iphoneos/check.lua b/xmake/platforms/iphoneos/check.lua
index d8a4e1bce..f912fc2b9 100644
--- a/xmake/platforms/iphoneos/check.lua
+++ b/xmake/platforms/iphoneos/check.lua
@@ -68,7 +68,6 @@ function _toolchains(config)
checker.toolchain_insert(toolchains, "ex", cross, "ar", "the static library extractor")
checker.toolchain_insert(toolchains, "sh", cross, "clang++", "the shared library linker")
checker.toolchain_insert(toolchains, "sh", cross, "clang", "the shared library linker")
- checker.toolchain_insert(toolchains, "dg", cross, "lldb", "the debugger")
-- insert objc/c++ tools to toolchains
checker.toolchain_insert(toolchains, "mm", cross, "clang", "the objc compiler")
diff --git a/xmake/platforms/linux/check.lua b/xmake/platforms/linux/check.lua
index 28ced9072..29f3f7d99 100644
--- a/xmake/platforms/linux/check.lua
+++ b/xmake/platforms/linux/check.lua
@@ -90,8 +90,6 @@ function _toolchains(config)
checker.toolchain_insert(toolchains, "sh", cross, "gcc", "the shared library linker")
checker.toolchain_insert(toolchains, "sh", cross, "clang++", "the shared library linker")
checker.toolchain_insert(toolchains, "sh", cross, "clang", "the shared library linker")
- checker.toolchain_insert(toolchains, "dg", cross, "gdb", "the debugger")
- checker.toolchain_insert(toolchains, "dg", cross, "lldb", "the debugger")
-- insert objc/c++ tools to toolchains
checker.toolchain_insert(toolchains, "mm", cross, "clang", "the objc compiler")
diff --git a/xmake/platforms/macosx/check.lua b/xmake/platforms/macosx/check.lua
index e09776969..56d4e48c6 100644
--- a/xmake/platforms/macosx/check.lua
+++ b/xmake/platforms/macosx/check.lua
@@ -46,7 +46,6 @@ function _toolchains(config)
checker.toolchain_insert(toolchains, "ex", "xcrun -sdk macosx ", "ar", "the static library extractor")
checker.toolchain_insert(toolchains, "sh", "xcrun -sdk macosx ", "clang++", "the shared library linker")
checker.toolchain_insert(toolchains, "sh", "xcrun -sdk macosx ", "clang", "the shared library linker")
- checker.toolchain_insert(toolchains, "dg", "xcrun -sdk macosx ", "lldb", "the debugger")
-- insert objc/c++ tools to toolchains
checker.toolchain_insert(toolchains, "mm", "xcrun -sdk macosx ", "clang", "the objc compiler")
diff --git a/xmake/platforms/watchos/check.lua b/xmake/platforms/watchos/check.lua
index f4e7bab19..d7cf07cae 100644
--- a/xmake/platforms/watchos/check.lua
+++ b/xmake/platforms/watchos/check.lua
@@ -68,7 +68,6 @@ function _toolchains(config)
checker.toolchain_insert(toolchains, "ex", cross, "ar", "the static library extractor")
checker.toolchain_insert(toolchains, "sh", cross, "clang++", "the shared library linker")
checker.toolchain_insert(toolchains, "sh", cross, "clang", "the shared library linker")
- checker.toolchain_insert(toolchains, "dg", cross, "lldb", "the debugger")
-- insert objc/c++ tools to toolchains
checker.toolchain_insert(toolchains, "mm", cross, "clang", "the objc compiler")
diff --git a/xmake/tools/vsjitdebugger.lua b/xmake/tools/vsjitdebugger.lua
deleted file mode 100644
index 3a0fd9cc3..000000000
--- a/xmake/tools/vsjitdebugger.lua
+++ /dev/null
@@ -1,53 +0,0 @@
---!The Make-like Build Utility based on Lua
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership. The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
---
--- @author ruki
--- @file vsjitdebugger.lua
---
-
--- init it
-function init(shellname)
-
- -- save name
- _g.shellname = shellname or "vsjitdebugger"
-
-end
-
--- get the property
-function get(name)
-
- -- get it
- return _g[name]
-end
-
--- run the debugged program with arguments
-function run(shellname, argv)
-
- -- patch arguments
- argv = argv or {}
- table.insert(argv, 1, shellname)
-
- -- run it
- os.execv(_g.shellname, argv)
-end
-
--- check the given flags
-function check(flags)
-end
diff --git a/xmake/tools/windbg.lua b/xmake/tools/windbg.lua
deleted file mode 100644
index 918198245..000000000
--- a/xmake/tools/windbg.lua
+++ /dev/null
@@ -1,53 +0,0 @@
---!The Make-like Build Utility based on Lua
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership. The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- Copyright (C) 2015 - 2017, TBOOX Open Source Group.
---
--- @author ruki
--- @file windbg.lua
---
-
--- init it
-function init(shellname)
-
- -- save name
- _g.shellname = shellname or "windbg"
-
-end
-
--- get the property
-function get(name)
-
- -- get it
- return _g[name]
-end
-
--- run the debugged program with arguments
-function run(shellname, argv)
-
- -- patch arguments
- argv = argv or {}
- table.insert(argv, 1, shellname)
-
- -- run it
- os.execv(_g.shellname, argv)
-end
-
--- check the given flags
-function check(flags)
-end