-
-
Notifications
You must be signed in to change notification settings - Fork 111
Embedded Debugging
Oğuzhan Eroğlu edited this page Nov 24, 2021
·
13 revisions
Sometimes, you could not find a GDB build for ARM target (arm-none-eabi
) with Python3 support on GDB. In this situation you can quickly build your own GDB with Python3 support and arm-none-eabi
target.
I had to install libgmp-dev
package for Debian. If you have some missing build dependencies, configure
script will say the missing library, just find it in your package management system and install.
cd ~
wget https://ftp.gnu.org/gnu/gdb/gdb-11.1.tar.xz
tar zxvf gdb-11.1.tar.gz
mkdir gdb-11.1-build
cd gdb-11.1-build
../gdb-11.1/configure --with-python=/usr/bin/python3 --target=arm-none-eabi --enable-interwork --enable-multilib
make
As you see, you should pass your Python3 executable to configure script's --with-python
paramter just like --with-python=/usr/bin/python3
.
After build is successful, you should can run GDBFrontend like this:
gdbfrontend -g $(realpath ~/gdb-11.1-build/gdb/gdb) -G --data-directory=$(realpath ~/gdb-11.1-build/gdb/data-directory/)
It looks like this: