Debugger help needed
I'm having a problem debugging with Qt Creator on a target (ATSAMA5D2B-XULT). When I try to debug a simple "hello world" program I get a message box:
The inferior stopped because it received a signal from the operating system. Signal name: SIGILL Signal meaning: Illegal instruction
The debugger is stoppped in rtld.c at line 632:
const char *lossage = TLS_INIT_TP (tcbp);
Here are some clues I've been working with:
The program manually runs on the target --> I must have the cross compile tools configured correctly in Qt Creator.
Here is the program:
for (int i=0; i < 5; i++)
Here is the build output:
g++ -c -O2 -pipe -g -feliminate-unused-debug-types -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a5 --sysroot=/opt/poky-atmel/2.1.1/sysroots/cortexa5hf-neon-poky-linux-gnueabi -g -std=gnu++0x -Wall -W -fPIC -I../fridayConsole -I. -I/opt/poky-atmel/2.1.1/sysroots/cortexa5hf-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-g++ -o main.o ../fridayConsole/main.cpp
g++ -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/opt/poky-atmel/2.1.1/sysroots/cortexa5hf-neon-poky-linux-gnueabi -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a5 -o fridayConsole main.o
I can manually run gdserver on the target, gdb on the client, and successfully debug --> everything is present on both platforms to allow debugging.
I have a similar board (ATSAMA5D4-XULT) that has an older kernel version and a slightly different root filesystem on which I can use Qt Creator to successfully debug the same program (no re-compile or change in Qt Creator parameters is necessary) --> I must have sysroot, Qt Creator debug, cross-compile, device, and qt version parameters configured correctly in the kit.
My tools have the following versions:
Qt Creator version: 3.4.2
gdb version: 7.10.1
gdbserver version: 7.6.2
Any advice is greatly appreciated, thanks.
m.sue last edited by
on a PC e.g. you can get such errors when you run an app that is compiled with an unsupported instruction set, like when you compile your app or the Qt libraries with SSE4 instructons and run it on a machine that does not support them.
Maybe it's something similar.
Would I be able to manually run and debug the program if the compile flags were incorrect?
m.sue last edited by m.sue
Yes, with the kind of problem I spoke of, you can do everything until you get to the first "illegal instruction". Then it will crash.
I had such a problem once and after half a day of frustrating debugging and searching the internet I luckily remembered that I clicked on some unsuspicious checkboxes about a week ago :-)
I double checked all the compile and build flags, I'm pretty confident about them. Do you remember which check boxes gave you trouble?