Debugging a Processor (aka. the shared library problem...)
Compile without optimization -O0, but with -g: CMAKE_BUILD_TYPE=Debug. CMAKE_BUILD_TYPE=RelWithDebug should work as well, but might lead to confusing and missleading output during debugging or on crashes.
Start debugger:
$ ddd <full-path-to-marlin-binary>
Because Marlin loads the shared libaries with the processors at run time, you cannot set breakpoints in these processors, before Marlin is started.
You could do something like
$ break Marlin.cc:102
where the line number 102 should be adjusted and point to the line of code after
ProcessorLoader loader( libs.begin() , libs.end() ) ;
Now, you can start Marlin
$ run steering-file.steer
At this point the shared libraries are loaded, so the source of the processors is available.
Open Source ...
Continue ...
