I'm working on a sensor with PSI5 interface and I'm using PSI Simulyzer box to simulate the environment during testing. This box comes with a software (some sort of digital oscilloscope) to make the measurements, but API header files and libraries are also provided. My intent is to use this API to automate non-regression test measurements.
This API is very poorly documented - it's basically a doxygen generated from the header file. I'm trying to guess the missing details, but some things just won't work in my software. Namely, I don't seem to be able to switch between synchronous and asynchronous modes, while the original software has a drop-down which works just fine.
I decided to analyze the original software by placing breakpoints to several (about 20) DLL functions which seem to be related to configuration in Visual Studio debugger, and note which of these functions are called, and with which arguments. I didn't succeed so far - when I call the same functions with the same arguments on my side, communication mode won't change.
Here's what I think causes my approach to fail:
- I didn't set the breakpoints to all functions (there are about 100 of them)
- I didn't analyze the calls from the beginning. Maybe there is some sort of pre-config sequence which I'm missing.
- Some functions take pointer arguments (e.g.
int16_t *config) and I have no idea how many bytes I need to provide them. Maybe they point to structures with more pointers inside, which I cannot guess.
I see how to overcome issues 1 and 2, but doing such extended analysis by hand is too time-consuming. Is there a way to automate the process of setting breakpoints to all functions of a DLL, and log the arguments when these functions are called? Maybe there is a debugger more adapted to this task than Visual Studio?