how to debug synchronous exception inside QEMU session

How to debug synchronous exception inside QEMU session ?

More context could be found at https://github.com/OP-TEE/optee_os/issues/3916#issuecomment-640986343 ?

More questions in this forum