Add 'run_gdb.sh' and a GDB script for aarch64

Debugging the EL2 portion of PKVM is hard because ELF addresses
do not match hyp VA. Add a GDB script with helper commands that
make it easier to compute hyp VAs of ELF symbols at runtime.

The script boots the kernel up to a point when memory layout has
been determined and reads the relevant constants from kernel memory.

Vmlinux ELF is loaded twice: once under kernel VA and once under
hyp VA. This way debug info is available when stepping through
hyp code as well, enabling showing C source and dumping the stack.
However, bringing in C symbols means that symbols are displayed
without the '__kvm_nvhe_' ELF prefix.

Add 'run_gdb.sh' wrapper which inserts the ELF path into the GDB
script and invokes GDB with it.

Change-Id: Icd4f648c22285ca0e7a65cba8630b19d2041c2fc
4 files changed
tree: 3189cde9196ea8b87682743a8616d26f914efffa
  1. aarch64/
  2. aarch64-unit-tests/
  3. kvm-unit-tests/
  4. common.inc
  5. Makefile