This is a quick post that shows how to enable gdb and/or gdbserver on the Raspberry Pi when using Buildroot.
Enable option Build packages with debugging symbols, under Build Options
Enable the following options under Toolchain
- Build cross gdb for the host – to facilitate remote debugging
- Thread library debugging – to enable adding gdb and gdbserver packages to the device’s root file system
Select gdb and gdbserver (useful for remote debugging), under Target packages, “Debugging, profiling and benchmark”