Failed to load custom analyzer

Ok, finally had a chance to test this. You will need to attach gdb to a running process.
This is because the *.AppImage program we distribute is actually an AppImage wrapper around the Logic software. However, the launched process doesn’t load your analyzer either, it launches another instance of itself which eventually loads your analyzer.

How to identify the process you will want to debug:

  1. Open the Logic 2 app and add your analyzer. (It needs to be added for the lib to be loaded. We load and then unload the lib once at startup to get its identification, but the shared library isn’t loaded again until you add it.
  2. Run ps ax | grep Logic
  3. There should be at least 7 matches. Several will have the path /tmp/.mount_Logic-XXXXXX/Logic. Of those items, look for ones that have the argument --type=renderer. I see two of those on my machine. Note their process IDs.
  4. To figure out which one has loaded your library, run lsof -p <process id> | grep <libYourAnalyzer.so>
    One of the two process IDs will have a match, the other will not.
    Then, run gdb. Then type attach <process id>.

Let me know if that works for you! I haven’t verified that debugging will work, but I did verify that this will determine the PID of the process that loaded libserial_analyzer.so on Ubuntu 20.

It would be nice if our app displayed the correct process ID somewhere, we may add that.

1 Like