picoscope_ltrace_conf/README.md

38 lines
3.8 KiB
Markdown
Raw Permalink Normal View History

# PicoScope ltrace configuration
2023-11-13 13:18:41 +00:00
Configuration file for `ltrace` utility created using the [official API documentation](https://www.picotech.com/download/manuals/picoscope-5000-series-a-api-programmers-guide.pdf),
with the ultimate goal of recording and analyzing the sequence of function calls to the `libps5000a` shared library for debug purposes.
The command used to debug the PicoScope GUI program is:
```
ltrace --config <path_to_config_file> -f --demangle -x 'ps5000*' -L --indent 2 --no-signals --output <path_to_output_log> bash -c picoscope
```
An example of the resulting log file is:
```
ps5000aCurrentPowerSource@libps5000a.so.2(1) = PICO_OK
ps5000aStop@libps5000a.so.2(1) = PICO_OK
ps5000aSetDeviceResolution@libps5000a.so.2(1, PS5000A_DR_8BIT) = PICO_OK
ps5000aSetChannel@libps5000a.so.2(1, PS5000A_CHANNEL_A, 1, PS5000A_DC, PS5000A_2V, 0.000000) = PICO_OK
ps5000aSetBandwidthFilter@libps5000a.so.2(1, PS5000A_CHANNEL_A, PS5000A_BW_FULL) = PICO_OK
ps5000aSetChannel@libps5000a.so.2(1, PS5000A_CHANNEL_B, 1, PS5000A_DC, PS5000A_5V, 0.000000) = PICO_OK
ps5000aSetBandwidthFilter@libps5000a.so.2(1, PS5000A_CHANNEL_B, PS5000A_BW_FULL) = PICO_OK
ps5000aGetNoOfCaptures@libps5000a.so.2(1, 0) = PICO_NO_SAMPLES_AVAILABLE
ps5000aSetNoOfCaptures@libps5000a.so.2(1, 50) = PICO_OK
ps5000aMemorySegments@libps5000a.so.2(1, 50, 10737024) = PICO_OK
ps5000aSetEts@libps5000a.so.2(1, PS5000A_ETS_OFF, 1, 1, 0) = PICO_OK
ps5000aNearestSampleIntervalStateless@libps5000a.so.2(1, 3, 0.000000, PS5000A_DR_8BIT, 0, 1, 0.000000) = PICO_OK
ps5000aGetTimebase2@libps5000a.so.2(1, 1, 5004, 2.000000, 5368512, 0) = PICO_OK
ps5000aSetTriggerChannelDirectionsV2@libps5000a.so.2(1, { PS5000A_CHANNEL_A, PS5000A_RISING, PS5000A_LEVEL }, 3) = PICO_OK
ps5000aSetPulseWidthDigitalPortProperties@libps5000a.so.2(1, nil, 0) = 287
ps5000aSetTriggerChannelProperties@libps5000a.so.2(1, { 16384, 1024, 16384, 1024, PS5000A_CHANNEL_A, PS5000A_LEVEL }, 3, 0, 0) = PICO_OK
ps5000aSetTriggerChannelConditionsV2@libps5000a.so.2(1, { PS5000A_CHANNEL_B, PS5000A_CONDITION_TRUE }, 1, 3) = PICO_OK
ps5000aSetPulseWidthQualifierProperties@libps5000a.so.2(1, 0, 0, PS5000A_PW_TYPE_NONE) = PICO_OK
ps5000aSetPulseWidthQualifierConditions@libps5000a.so.2(1, nil, 0, PS5000A_CLEAR) = PICO_OK
ps5000aSetTriggerDelay@libps5000a.so.2(1, 0) = PICO_OK
ps5000aGetNoOfCaptures@libps5000a.so.2(1, 0) = PICO_NO_SAMPLES_AVAILABLE
ps5000aRunBlock@libps5000a.so.2(1, 252, 4752, 1 , 1, 0, 0x7f4bd2d02320, 0) = PICO_OK
ps5000aGetNoOfCaptures@libps5000a.so.2(1, 0) = PICO_OK
```
Note that each line in the configuration file must be shorter than 1000 characters, thus the defined status enum is not complete.