We have a C++ executable that will be executed by another Java program. I want to debug this C++ executable, but by the time I attach GDB to its PID, the startup code that I want to debug has already executed.
Instead of attaching GDB to the process, I want the process to automatically attach itself to GDB when it starts. How can I achieve this?
If you know how to achieve this in CLion, clangd+VSCode, or Qt Creator, please explain the steps for each.