Pretrace is a preload library that ensures certain linked applications are always executed. It facilitates their debugging and tracking by tracking their calls within the code.
Getting started with Pretrace is straightforward. Simply add libpretrace.so to your /etc/ld.so.preload to enable the software. Next, you can specify the applications to trace in /etc/pretrace.conf. Here, you'll list one application per line, followed by a debugger if needed. If you don't specify a debugger, the default option is strace, which saves the output to .logfile in the current working directory.
You can also append an optional number in the format %N, eg P, to specify the percentage of invocations you'd like to trace. This feature allows you to specify the exact level of monitoring you need with ease. Additionally, an example pretrace.conf is included in the software distribution to help get you started.
After making any changes to pretrace.conf, it's important to execute ptgenmap to generate a new map file. This step ensures that your configuration updates are processed quickly and efficiently, with minimal impact on initialization time.
Overall, libpretrace is an excellent debugging utility that's perfect for developers and auditors. However, it's worth noting that it's not intended for use in a production environment. For a reliable and robust debugging solution, look no further than Pretrace.
Version 0.4: N/A