summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging/scripts/commands/backtrace.qs
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripttools/debugging/scripts/commands/backtrace.qs')
-rw-r--r--src/scripttools/debugging/scripts/commands/backtrace.qs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/scripttools/debugging/scripts/commands/backtrace.qs b/src/scripttools/debugging/scripts/commands/backtrace.qs
new file mode 100644
index 0000000..4e959fd
--- /dev/null
+++ b/src/scripttools/debugging/scripts/commands/backtrace.qs
@@ -0,0 +1,26 @@
+name = "backtrace";
+
+group = "stack";
+
+shortDescription = "Print backtrace of stack frames";
+
+longDescription = "";
+
+aliases = [ "bt" ];
+
+seeAlso = [ "frame", "info" ];
+
+function execute() {
+ scheduleGetBacktrace();
+};
+
+function handleResponse(resp) {
+ var strings = resp.result;
+ var msg = "";
+ for (var i = 0; i < strings.length; ++i) {
+ if (i > 0)
+ msg += "\n";
+ msg += "#" + i + " " + strings[i];
+ }
+ message(msg);
+}