A new feature introduced in PetaLinux 2015.4 allows users to use XSDB to connect to a running QEMU target.
After starting QEMU in a separate terminal, you can attach XSDB to it.
Here is the syntax for the command:
petalinux-util --xsdb-connect <host>
required options for connecting XSDB to QEMU usage:
This is the required argument to specify the remote end port that XSDB should connect to. This should be the host and port that QEMU has open for GDB connections.
This can be found in the command line arguments from: --gdb tcp:<QEMU_HOST>:<QEMU_PORT>