Trace32 script to print stack frame to a file

A very simple scripts, but took me a while to found it. Basically in Trace32, I need to capture stack trace whenever a certain memory location is being written. I got tired of doing it manually, and have to copy & paste the stack trace everytime. Searching it in Google didn’t give me a clue, so I read through Trace32 manual to find out how to do it.

Finally, I found the easy way to do it, here is the script / command in its glory:

# printer.clipboard -> to redirect to clipboard
# use this to redirect to file
printer.open "c:/kusno_trace_1.txt"

# command to be run inserted in the  the breakpoint
wp.var.Frame

# close printer after we're done
printer.close

The trick here is using printer to print the content of the var.Frame…

Tags:

  • vineet

    Thanks… It is really useful…

  • vineet

    Thanks… It is really useful…