Getting the content of open Var.Watch windows from script is not directly supported in TRACE32.
However you can do the following in you script
- Redirect printing to a file
PRinTer.FILE "~~~/winpage.txt" ASCIIE
(of course you can choose any other filename instead of winpage.txt)
- The window
WinPAGE.List
shows you all open child windows. With WinPrint.WinPAGE.List
you can sent the list of all open windows to the file specified before (winpage.txt).
Now parse the content of winpage.txt for the names of the windows, which are a watch windows. The window names start by default with a capital 'W' followed by three decimal digits (but can also be totally different) and are then followed by the command (in round brackets) which was used to open the windows. Compare case insensitive!
The watch windows have a command which starts with:
- B::Var.Watch
- B::V.Watch
- B::Var.W
- B::V.W
Redirect printing to a new file e.g. PRinTer.OPEN "~~~/varwatch.txt" ASCIIE
- Send the content of each open watch window to the file varwatch.txt with the command
WinPRT <window name>
. The relevant window names you've got from step 3. Execute WinPrt for each open watch window.
- Close varwatch.txt with
PRinTer.CLOSE
Now you should have the content of all open watch-windows in the file varwatch.txt.
Other idea:
- Use command
STOre "mywindows.cmm" Win
to save commands to create all open windows to a script.
- Parse this script for all lines starting with Var.Watch (or one of it's shorts forms) and the lines starting with Var.AddWatch (or one of it's shorts forms). Parse case insensitive!. The arguments followed by Var.Watch or Var.AddWatch are the variables currently shown in the watch windows.