Compile Legato application with debug information to print readable stack backtrace

I have checked in the target:

root@swi-mdm9x28-wp:~# ls -l /legato/systems/current/appsWriteable/hello1/bin/he
llo1
lrwxrwxrwx    1 root     root            56 Jan  6 08:05 /legato/systems/current/appsWriteable/hello1/bin/hello1 -> /legato/systems/current/apps/hello1/read-only/bin/hello1
root@swi-mdm9x28-wp:~# ls -l /legato/systems/current/apps/hello1/read-only/bin/h
ello1
-rwxr-xr-x    1 root     root         17156 Jan  6 08:05 /legato/systems/current/apps/hello1/read-only/bin/hello1

Then I checked the same file in build folder:

owner@ubuntu:~/leaf$ ls -l _build_hello1/wp76xx/app/hello1/obj/hello1/hello1 
-rwxrwxr-x 1 owner owner 17156 Nov 13 14:49 _build_hello1/wp76xx/app/hello1/obj/
owner@ubuntu:~/leaf$ file  _build_hello1/wp76xx/app/hello1/obj/hello1/hello1 
_build_hello1/wp76xx/app/hello1/obj/hello1/hello1: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=ff606e2ffebae987cbec835562a22357ed8b057d, with debug_info, not stripped

By default, It is already “not stripped”.

BTW, you might also take a look here: