To generate a OpenAMP Linux application with debugging symbols in PetaLinux do the following:
1. Enable open-amp demos and open-amp with debug symbols. These can be enabled via petalinux-config -c rootfs
-> Filesystem Packages
--> libs
---> open-amp
[*]open-amp
[*]open-amp-dbg
[*]open-amp-demos
2. Enable the gdb package. The gdb package can be enabled as follows:
petalinux-config -c rootfs
-> Filesystem Packages
--> misc
---> gdb
3. Build with petalinux-build.
Please refer to gdb documentation for how to debug a linux application using gdb at: https://www.gnu.org/software/gdb/documentation/