To build packages with debug compilation flags, add the following to the conf/local.conf configuration file:
DEBUG_BUILD = "1"
This changes the compilation flags to debug optimization as follows:
DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -
pipe"
The -fno-omit-frame-pointer flag will tell gcc to keep stack frames. The compiler will also reduce the optimization level to provide a better debugging experience.
After building and installing the target images and SDK again, you can now follow the same process.