|
Last change
on this file since 280 was 2, checked in by Dmitry A. Kuminov, 17 years ago |
|
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
|
File size:
928 bytes
|
| Line | |
|---|
| 1 | name = "frame";
|
|---|
| 2 |
|
|---|
| 3 | group = "stack";
|
|---|
| 4 |
|
|---|
| 5 | shortDescription = "Select and print a stack frame";
|
|---|
| 6 |
|
|---|
| 7 | longDescription = "";
|
|---|
| 8 |
|
|---|
| 9 | aliases = [ "f" ];
|
|---|
| 10 |
|
|---|
| 11 | function execute() {
|
|---|
| 12 | if (arguments.length == 0)
|
|---|
| 13 | requestedFrameIndex = getCurrentFrameIndex();
|
|---|
| 14 | else
|
|---|
| 15 | requestedFrameIndex = parseInt(arguments[0]);
|
|---|
| 16 | scheduleGetContextInfo(requestedFrameIndex);
|
|---|
| 17 | state = 1;
|
|---|
| 18 | };
|
|---|
| 19 |
|
|---|
| 20 | function handleResponse(resp, id) {
|
|---|
| 21 | if (state == 1) {
|
|---|
| 22 | var info = resp.result;
|
|---|
| 23 | if (info == undefined) {
|
|---|
| 24 | message("Frame index out of range.");
|
|---|
| 25 | return;
|
|---|
| 26 | }
|
|---|
| 27 | setCurrentFrameIndex(requestedFrameIndex);
|
|---|
| 28 | setCurrentScriptId(info.scriptId);
|
|---|
| 29 | setCurrentLineNumber(info.lineNumber);
|
|---|
| 30 | scheduleGetBacktrace();
|
|---|
| 31 | state = 2;
|
|---|
| 32 | } else if (state == 2) {
|
|---|
| 33 | var backtrace = resp.result;
|
|---|
| 34 | message("#" + getCurrentFrameIndex() + " " + backtrace[getCurrentFrameIndex()]);
|
|---|
| 35 | }
|
|---|
| 36 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.