summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/project/task.lua11
-rw-r--r--xmake/core/sandbox/modules/coroutine.lua2
-rw-r--r--xmake/core/sandbox/sandbox.lua2
3 files changed, 8 insertions, 7 deletions
diff --git a/xmake/core/project/task.lua b/xmake/core/project/task.lua
index d695c9c83..672df88b0 100644
--- a/xmake/core/project/task.lua
+++ b/xmake/core/project/task.lua
@@ -128,16 +128,17 @@ function task._translate_menu(menu)
end
-- add common options
- table.insert(options, 1, {'v', "verbose", "k", nil, "Print lots of verbose information." })
- table.insert(options, 2, {nil, "version", "k", nil, "Print the version number and exit." })
- table.insert(options, 3, {'h', "help", "k", nil, "Print this help message and exit." })
+ table.insert(options, 1, {'v', "verbose", "k", nil, "Print lots of verbose information." })
+ table.insert(options, 1, {'b', "backtrace", "k", nil, "Print backtrace information for debugging." })
+ table.insert(options, 2, {nil, "version", "k", nil, "Print the version number and exit." })
+ table.insert(options, 3, {'h', "help", "k", nil, "Print this help message and exit." })
table.insert(options, 4, {})
- table.insert(options, 5, {'f', "file", "kv", nil, "Read a given xmake.lua file." })
+ table.insert(options, 5, {'f', "file", "kv", nil, "Read a given xmake.lua file." })
table.insert(options, 6, {'P', "project", "kv", nil, "Change to the given project directory."
, "Search priority:"
, " 1. The Given Command Argument"
, " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" })
+ , " 3. The Current Directory" })
table.insert(options, 7, {})
end
diff --git a/xmake/core/sandbox/modules/coroutine.lua b/xmake/core/sandbox/modules/coroutine.lua
index a704af6c3..f01506cfa 100644
--- a/xmake/core/sandbox/modules/coroutine.lua
+++ b/xmake/core/sandbox/modules/coroutine.lua
@@ -43,7 +43,7 @@ function sandbox_coroutine.resume(co, ...)
-- get errors
local errors = results
- if option.get("verbose") then
+ if option.get("backtrace") then
errors = debug.traceback(co, results)
elseif type(results) == "string" then
-- remove the prefix info
diff --git a/xmake/core/sandbox/sandbox.lua b/xmake/core/sandbox/sandbox.lua
index c4da87b05..64729bf7f 100644
--- a/xmake/core/sandbox/sandbox.lua
+++ b/xmake/core/sandbox/sandbox.lua
@@ -35,7 +35,7 @@ local option = require("base/option")
function sandbox._traceback(errors)
-- not verbose?
- if not option.get("verbose") then
+ if not option.get("backtrace") then
if errors then
-- remove the prefix info
local _, pos = errors:find(":%d+: ")