source: branches/4.5.1/src/scripttools/debugging/scripts/commands/down.qs

Last change on this file was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 808 bytes
Line 
1name = "down";
2
3group = "stack";
4
5shortDescription = "Select and print the stack frame below the current one";
6
7longDescription = "";
8
9seeAlso = [ "up", "frame" ];
10
11function execute() {
12 var idx = getCurrentFrameIndex();
13 if (idx == 0) {
14 warning("Already at bottom (innermost) frame.");
15 return;
16 }
17 setCurrentFrameIndex(idx - 1);
18 scheduleGetContextInfo(idx - 1);
19 state = 1;
20}
21
22function handleResponse(resp, id) {
23 if (state == 1) {
24 var info = resp.result;
25 setCurrentScriptId(info.scriptId);
26 setCurrentLineNumber(info.lineNumber);
27 scheduleGetBacktrace();
28 state = 2;
29 } else if (state == 2) {
30 var backtrace = resp.result;
31 message("#" + getCurrentFrameIndex() + " " + backtrace[getCurrentFrameIndex()]);
32 }
33}
Note: See TracBrowser for help on using the repository browser.