Tcl-scripting the Debugger Shell

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tcl-scripting the Debugger Shell

Jump to solution
1,047 Views
konrada
Contributor IV

Hello all,

 

I've read Erich Styger's article http://blogs.freescale.com/2012/04/27/scripting-welcome-to-the-debugger-shell/ on the Debugger Shell. Apparently, the Debugger Shell is based on Tcl. 

 

Is there a way to read registers and memory values into Tcl variables so that I can write a script which automatically parses Kinetis exception stack traces and tells me the last known PC (7th register in exception stack frame on either SP_MAIN or SP_PROCESS)?  

Labels (1)
0 Kudos
Reply
1 Solution
563 Views
CrasyCat
Specialist III

Hello

 

  Here I would use standard Evaluation & Substitutions feature from TCL.

 

  For example to store the value of a register named d3, I would use following notation

      set temp [reg d3]

 

  Check following Tutorial for more information on standard TCL language.

      http://www.tcl.tk/man/tcl/tutorial/tcltutorial.html

 

CodeWarrior manual only list the CodeWarrior specific TCL commands. For information on standard TCL commands and features, please refer to www.tcl.tk.

 

There are a couple of other location on the web where you can find more info on TCL language.

 

CrasyCat

View solution in original post

0 Kudos
Reply
2 Replies
564 Views
CrasyCat
Specialist III

Hello

 

  Here I would use standard Evaluation & Substitutions feature from TCL.

 

  For example to store the value of a register named d3, I would use following notation

      set temp [reg d3]

 

  Check following Tutorial for more information on standard TCL language.

      http://www.tcl.tk/man/tcl/tutorial/tcltutorial.html

 

CodeWarrior manual only list the CodeWarrior specific TCL commands. For information on standard TCL commands and features, please refer to www.tcl.tk.

 

There are a couple of other location on the web where you can find more info on TCL language.

 

CrasyCat

0 Kudos
Reply
563 Views
konrada
Contributor IV

Thanks. I just hadn't imagined that the commands both print and return a value.

0 Kudos
Reply