Debugging applications
The toolchain includes a gdb that can be used for remote debugging applications on the terminal.
Installing Debugger
There is no need to install additional software beside the VOS3 toolchain. The GNU debugger is located in the toolchain as bin/arm-none-linux-gnueabihf-gdb
user> bin/arm-none-linux-gnueabihf-gdb --version
GNU gdb (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 11.2.90.20220202-git
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.Using Debugger
For remote debugging to work, gdbserver needs to be started on the terminal.
$> gdbserver :22222 mybinary
Process /home/usr1/mybinary created; pid = 1137
Listening on port 22222To attach to an already running process also gdbserver can be instrumented. To allow attaching to a process, this feature needs to be enabled first as root user.
#> echo 0 > /proc/sys/kernel/yama/ptrace_scope
$> gdbserver :22222 --attach $(pidof mybinary)
Attached; pid = 1162
Listening on port 22222From the developers PC gdb can now be configured to connect to this gdbserver instance.
Last updated
Was this helpful?
