3

I am trying to remote debug (using gdbserver) an application running on an iMX6. My setup is Ubuntu 16.04 LTS and I'm using QT Creator 3.5.1 (based on 5.5.1 GCC 5.2.1).

The first thing to note is that the QT GDB remote debugger (single stepping) of the iMX6 application layer is working if I remove the system calls. "system(...)" or "read(...)". etc. However, any attempt to do a system call hangs the process. The system call never returns.

The second thing to note is that the application runs just fine when executed from the iMX6 directly (including system calls). I can even use GDB (command line) to debug the application. No problem here.

In QT Creator, I have added the addition GDB commands "set remote system-call-allowed 1" to the additional debugger commands that QT creator runs before launching the application. No success, still hangs. All system calls hang and never return.

Does anyone have any idea whats going on here? Why are my system calls not returning.

Sean Mayes
  • 158
  • 10

1 Answers1

2

This post led me to the answer. QT: Remote debugging to ARM using QT Creator hangs, command line GDB runs fine

For quick reference I examined the log created by QT. Select Windows->View->Debugger log

In my case, same as in the other post, detach-on-fork was set to off.

Solution was to

Add 'set detach-on-fork on' in QTCreator as part of the Debugger options (Tools->Options...., Debugger: GDB tab: Additional startup commands).

Sean Mayes
  • 158
  • 10