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,


I’ve the same problem with the -g option in mkapp

To generate symbol, i use the -g option in cflag in my component.cdef and add -g option in mkapp.
But it generate a directory with anonymous directory

find gdb -type f -name *.debug -print

But my application contain only one executable !

My questions are :

  • How generate symbol code in binary with mkapp ?
  • How to known the good symbol file ?