Currently, most of our debugging scopes use Qdebug to output information for viewing, or CERR standard C + + output. In this article, we will show you using GDB to debug our scope.
1) First create a basic scope
We use our SDK to create one of the most basic scopes:
This allows us to create a basic scope.
2) Install Gdbsever for our mobile phone
For some reason, our phone is not gdbserver. In order to debug, we need to install this software to be able to debug online. We start a terminal and type the following command:
So we'll install the gdbserver.
3) Commissioning of our scope
We can open our scope project and use the mouse to click the appropriate area to set breakpoints:
Set the "
" Flag bit in our compilation:
We can press the "
" key so that we can see our scope run to the breakpoint we set. We can check the values of the variables we want to know, or we can see the order in which the programs run.
We can see the values of each variable in the window above, and use the "
" key to track the operation of the scope step after stage.
For some reason, the mobile phone may be restarted when the scope is uninstalled after the scope is debugged. We already know the problem at the moment. The corresponding bug can be seen in the address.
How to debug Ubuntu Scope in Qt Creator