# Install gdb and gdbserver to toolchain Source: [https://docs.qualcomm.com/doc/80-41102-1/topic/Install-gdb-and-gdbserver-to-toolchain.html](https://docs.qualcomm.com/doc/80-41102-1/topic/Install-gdb-and-gdbserver-to-toolchain.html) ## About this task To install gdb and gdbserver to the toolchain, a NAD image build must be launched with the following source code changes: ## Procedure 1. Change the poky/meta-qti-bsp/conf/distro/mdm.conf file by removing the `gdb` and `gdbserver` packages from `PACKAGE_EXCLUDE`. 2. Create a recipe file of poky/meta-qti-bsp/recipes-bsp/recipes-devtools/gdb/nativesdk-packagegroup-sdk-host.bbappend and include the following: RDEPENDS_${PN} += "\ nativesdk-gdb \ nativesdk-gdbserver \ "Copy to clipboard 3. Change the poky/meta-qti-bsp/recipes-devtools/gdb/gdb\_%.bbappend file by adding`BBCLASSEXTEND = "nativesdk"` to the end of the file. 4. Change the poky/meta-qti-bsp/recipes-products/images/machine-image.bb file by adding the following two lines to the end of the file: IMAGE_INSTALL += "gdb" IMAGE_INSTALL += "gdbserver"Copy to clipboard 5. Create a recipe file of poky/meta-qti-bsp/recipes-kernel/lttng-ust/lttng-ust\_%.bbappend b/recipes-kernel/lttng-ust/lttng-ust\_%.bbappend and include the following: BBCLASSEXTEND = "nativesdk" Copy to clipboard 6. Create a recipe file of poky/meta-qti-bsp/recipes-support/liburcu/liburcu\_%.bbappend b/recipes-support/liburcu/liburcu\_%.bbappend and include the following: BBCLASSEXTEND = "nativesdk" Copy to clipboard 7. Run the build-sa515m-nad-image with all of these changes and install the toolchain with the installation script of oecore-x86\_64-armv7at2hf-neon-toolchain-nodistro.0.sh under poky/build/tmp-glibc/deploy/images/sa515m-nad/sdk. The gdb and gdbserver should now be available in the toolchain. **Parent Topic:** [Debug with GDB](https://docs.qualcomm.com/doc/80-41102-1/topic/Debug-with-GDB.html) Last Published: Aug 06, 2026 [Previous Topic Debug with GDB](https://docs.qualcomm.com/bundle/publicresource/80-41102-1/topics/Debug-with-GDB.md) [Next Topic Build the application with debug symbols](https://docs.qualcomm.com/bundle/publicresource/80-41102-1/topics/Build-the-application-with-debug-symbols.md)