Debug symbols not getting generated after using -d option


I am working on a legacy application and converting it to a legato app;

Legato debugger option works fine on accompanying sample apps, but on the legacy app, it does not produce the necessary .build-id file nor the .debug files. Can someone help resolve this ?


We can use standard directory like {D}/usr/bin else you add .debug to dbg - packages like this(Example): FILES_{PN}-dbg += " ${prefix}/tests/.debug
/WEBSERVER/www/cgi-bin/.debug" (meta-swi-mdm9x28-src/recipes/data/
Please avoid do_install_append as .debug is created after do_install.

If you’ve already build image, you can generate debug packages (xxx-dbg) which you can manually install as needed.
To generate debug info for packages, you can add dbg-pkgs to EXTRA_IMAGE_FEATURES in local.conf. For example:
EXTRA_IMAGE_FEATURES = “debug-tweaks tools-profile dbg-pkgs”

Below link provides info which needed,