src/scripttools/debugging/scripts/commands/backtrace.qs
changeset 0 1918ee327afb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/scripttools/debugging/scripts/commands/backtrace.qs	Mon Jan 11 14:00:40 2010 +0000
@@ -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);
+}