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/data_git.bb)
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,

Hy,

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
gdb/myApp/.build-id/c6/d6b0d72f9d9c5d76cc38d96eaa8846d59153c6.debug
gdb/myApp/.build-id/a4/776e04581a658fde0541ffbcfb63c3a0592c3a.debug

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 ?