OpenBoot 3.x Command Reference Manual

Using ftrace

The ftrace command shows the sequence of Forth words that were being executed at the time of the last exception. An example of ftrace follows.

ok : test1 1 ! ; 
ok : test2 1 test1 ; 
ok test2 
Memory address not aligned
ok ftrace 
! 		 Called from test1 	at ffeacc5c
test1 		 Called from test2 	at ffeacc6a
(ffe8b574) 	Called from (interpret 	at ffe8b6f8
execute 			Called from catch 	at ffe8a8ba
catch 			 Called from (fload) 	at ffe8ced8
(fload) 			Called from interact 	at ffe8cf74
execute 	Called from catch 	at ffe8a8ba
catch 		Called from (quit 	at ffe8cf98

In this example, test2 calls test1, which tries to store a value to an unaligned address. This results in the exception: Memory address not aligned.

The first line of ftrace's output shows the last command that caused the exception to occur. The next lines show locations from which the subsequent commands were being called.

The last few lines are usually the same in any ftrace output, because that is the calling sequence in effect when the Forth interpreter interprets a word from the input stream.