Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Applications compiled with the g++ compiler using the –g option include the necessary debugging information in the executable and can thus be debugged using the GNU Project Debugger (gdb).  Although the SmartServer IoT includes a pre-installed copy of the compiler (g++), gdb isn’t preinstalled on the SmartServer IoTIf you want to To use gdb to debug a custom IDL driver, it first needs to be installed onto the SmartServer IoT.To install gdb on the SmartServer IoT, the unit needs to have internet access in order to download the necessary packages.  follow these steps:

Ensure your SmartServer has Internet access.

Using a console application like PuTTY, navigate to the /usr/bin/ directory and type enter sudo apt update’.  The Advanced Package Tool will download package information from configured sources so it knows which packages are available for upgrade and where to retrieve them.


Once this completes, you can verify the installation of gdb by checking the version information from the console by typing ‘gdb --version’.  You should get will see version information in response, similar to what is shown below.

Note that installing Installing the GNU Project Debugger also installs the associated gdbserver application, which provides options for debugging applications remotely as well.

With gdb installed on the SmartServer IoT, you can debug an application like the example custom driver by starting it up under gdb control using ‘sudo gdb ./example’ as shown below.

Note that the You may see an error referencing ‘libcrypto’, which is highlighted above, .  The error is benign and you can be ignoredignore it.  You can also prevent this reported error (and others such as designed interruptions) by using the command ‘handle SIGILL nostop noprint’ within gdb just before you run (r) or continue (c) a managed driver application like ‘./example’.  Although gdb is a command line debugger, it is a full-featured debugging tool.  You can set breakpoints, inspect variables, start and stop program execution, single step, and so on.  There is an extensive list of available commands you can use within gdb to manage the debugging of your application.  Since these commands are readily documented online from many sources, including from itself, these are not documented here, however you can easily find this information online from sources like

As mentioned above, installing the GNU Project Debugger installs not only the command line debugger (gdb), it also installs the gdbserver application on the SmartServer IoT.  gdbserver makes it possible to remotely connect to and debug an application running on the SmartServer IoT from another development system such as a PCWindows-based computer.  The setup for remote debugging is dependent on whether this development PC host is Linux or Windows based, and may differ depending on the OS version.  For example, on a Windows-based PC computer this generally requires installing and configuring several tools in addition to the Microsoft C/C++ extension in Visual Studio Code as well as Mingw-w64 described in Compiling a Custom Driver.  Some of the additional required tools may include the Native Debug Extension in Visual Studio Code as well as OpenSSH (installed with GIT), which is used to create an SSH key pair from the PC computer to be installed onto the SmartServer IoT.  Since there are various techniques for remote debugging, they are not covered in detail in this documentation. You can reach out to the support organization for more details.