HowTo: Test and Debug AArch64 GDB

  • This page explains how to do aarch64 gdb development and testing.
  • AArch64 GDB can be run in remote mode using:
    • Arm v8 Foundation Model Simulation Environment
    • QEMU Simulation Environment
    • ARM v8 based Hardware

Setting up AArch64 GDB using Foundation Model

  • This section provides step by step instructions on how to do aarch64 gdb development and testing using foundation model.

Step 1 : Setting up Aarch64 tool chain

Step 2 : Setting up ARM v8 Foundation Model

Step 3 : Setting up Network Bridge

  • sudo apt-get install bridge-utils
  • sudo ip tuntap add tap0 mode tap
  • sudo ifconfig tap0

Step 4 : Running Fast Model

  • As sudo user start the foundation model: sudo ./Foundation_v8pkg/models/Linux64_GCC-4.1/Foundation_v8 --image img-foundation.axf --block-device vexpress64-openembedded_lamp-armv8-gcc-4.8_20140222-611.img --network bridged --network-bridge=tap0
  • Set an ip address for the model via "ifconfig eth0"

Step 5 : Set up NFS between host machine and the ARM V8 Foundation Model

  • In the host machine export the folder you wish to mount by adding "foldertomount,no_root_squash)" line in /etc/exports
  • Install nfs kernel and make sure it is started "sudo service nfs-kernel-server start"
  • Turn off any firewall in host machine "sudo service ufw stop"

Step 3 : Fetch and Build AArch64 GDB

  $ tar expat-2.1.0.tar.gz
  $ cd expat-2.1.0
  $ ./configure --host=aarch64-linux-gnu --prefix=/usr/aarch64-linux-gnu
  $ make
  $ sudo install
  • Build and install termcap library for aarch64:

  $ tar xvzf termcap-1.3.1.tar.gz
  $ cd ./termcap-1.3.1
  $ export CC=aarch64-linux-gnu-gcc
  $ ./configure --host=aarch64-linux-gnu --prefix=/usr/aarch64-linux-gnu
  $ make
  $ sudo make install
  • Build gdb for remote target:

  $ cd binutils-gdb
  $ ./configure --target=aarch64-linux-gnu --with-expat --disable-nls --disable-sim --disable-install-libbfd --with-sysroot=remote:
  $ make -j`getconf _NPROCESSORS_ONLN`

WorkingGroups/ToolChain/GDB/aarch64gdb (last modified 2014-04-08 11:23:37)