6.30.4 Locating exception source

An uncaught exception shows a backtrace (actually a return stack dump, see Error messages). If the return stack entry is a return address, the immediately preceding location produced the call that the return address would have returned from, and is shown as word in the backtrace. You can inspect the source code of such a call with the following words:

tt ( u –  ) gforth-1.0

Show the source code corresponding to the backtrace line with index u (indices are shown in the backtrace after the file name and position information and before the return stack content and its interpretation as return address), set the current location there, and then call fancy-after-l for navigating the displayed source (including switching to the next or previous result).

nt ( ) gforth-1.0

Show the source code corresponding to the next backtrace line and set the current location there. The “next backtrace line wraps around to the first one if you reach the end. Then call fancy-after-l for navigating the displayed source (including switching to the next or previous result).

bt ( ) gforth-1.0

Show the source code corresponding to the previous backtrace line and set the current location there. The “previous backtrace line” wraps around to the last one if you reach the beginning. Then call fancy-after-l for navigating the displayed source (including switching to the next or previous result).