Strace

From Sp305x wiki

Jump to: navigation, search

Strace is a small utility to find out what OS-calls are called by a certain binary game, either home-brewn or existing.

How it works

When you run strace.bin, the binary will install a bit of code called a 'shim' to somewhere high in memory. It'll then backup the OS call function table to that position, too, and then replace all the function calls with calls to the previously installed binary code. Now, any program which tries to call an OS-function will in reality call the binary shim. That code will output the arguments and the name of the function call to the serial port, and then calls the real OS-function. It'll then output modified variables and the result of the function call, before returning back to the program.

As you may have seen, strace is a powerfull debugging / reverse engineering tool.

Download

You can download the latest version of strace, including source-code, from http://spmp305x.spritesserver.nl/strace.