0

I'd like to create a diagnosis script and would like somehow to get all the variables the user inputs in a watch window to a script. How may i access the watch variables and manipulate them?

I tried with a DIALOG.view but that wastes too much time. There might be another trace command but I don't know it. Thank you!

M. Alex
  • 49
  • 1
  • 1
  • 5
  • suggest examining the source code for the utility `ddd` (from the linux family of overlays for the `dbg` utility – user3629249 Jul 13 '19 at 14:11

1 Answers1

0

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

  1. Redirect printing to a file PRinTer.FILE "~~~/winpage.txt" ASCIIE (of course you can choose any other filename instead of winpage.txt)
  2. 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).
  3. 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
  4. Redirect printing to a new file e.g. PRinTer.OPEN "~~~/varwatch.txt" ASCIIE

  5. 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.
  6. Close varwatch.txt with PRinTer.CLOSE

Now you should have the content of all open watch-windows in the file varwatch.txt.


Other idea:

  1. Use command STOre "mywindows.cmm" Win to save commands to create all open windows to a script.
  2. 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.
Holger
  • 3,920
  • 1
  • 13
  • 35