Re: enabling symbols for debug in clinfo

Quentin Schulz

Hi Steve,

On 5/9/22 12:54, Monsees, Steven C (US) via wrote:
I'd like to build clinfo w/ "-g" option to do some debugging with GDB...
I am looking at: meta-openembedded/meta-oe/recipes-support/opencl/
I created a "bbapend" file to modify the build recipes "" file prior to build, to introduce '-g' for CFLAGS & CPPFLAGS, i.e. at top of added:
I checked the build tree and see my modified "" updated as expected, the update occurs at the end of the install process, using do_install_append... so the build should have used my modified file... but I do not have symbols for the clinfo package when I go to use GDB.
The install task runs after the software has been built. It is therefore expected your changes aren't actually taken into account.

c.f., I guess it is not THAT obvious that it happens after compilation. Maybe a patch to the documentation would help clear things out.

You shouldn't need to modify the makefile and just add "-g" to TARGET_CFLAGS/ TARGET_CXXFLAGS or CFLAGS/CXXFLAGS in your recipe.

Also, I have never used it but we do have support for debuginfod which should make it easier to debug remotely without installing the binary with debug symbols, c.f.


Join to automatically receive all group messages.