I tried to debug a program with gdb in Raspbian, but all I get is:
Program received signal SIGILL, Illegal instruction.
0xb6fe8acc in ?? () from /lib/ld-linux-armhf.so.3
It doesn't help to set the SIGILL
handle to nostop
(handle SIGILL nostop
):
Program received signal SIGILL, Illegal instruction.
Program terminated with signal SIGILL, Illegal instruction.
The program no longer exists.
All backtrace I get is:
#0 0xb6fe8acc in ?? () from /lib/ld-linux-armhf.so.3
#1 0x00000000 in ?? ()
If I start the program outside of gdb, I get a normal C++ exception (that I would like to debug).
All software were updated to latest version from the raspbian repositories. Further I tried the raspberry pi foundation kernel "3.18.9+" and also the raspbain kernel "3.18.0-trunk-rpi" (I need some custom kernel modules). I can debug the same program on my main machine without any problems.
Update: Debugging works as expected with kernel "3.12-1-rpi".
What is causing this error?
handle SIGILL pass nostop
? – mpromonet Mar 25 '15 at 18:31pass
is by default set, it shouldn't make a difference, and it didn't make any. Same result as withhandle SIGILL nostop
– someonr Mar 25 '15 at 18:34bt
)? I think you need to think about providing more context here if you seriously expect someone to explain "What is causing this error?" based only on an illegal instruction in the linker/loader (ld-linux-armhf
). – goldilocks Mar 25 '15 at 18:47-g
? You might get something instead of??
in the backtrace. – goldilocks Mar 25 '15 at 19:17valgrind
before, I might take a look at it. I just tested with "3.12-1-rpi" kernel and could debug. This is really strange (for me). – someonr Mar 25 '15 at 20:46valgrind
is awesome, you're going to love it once you get what it does. It will spot memory violations (e.g., buffer overflows), which can be the cause of all manner of grief. You may have to connect the dots (violation to problem) yourself, but since you don't want any violations, just plain getting rid of them may magically solve problems that appeared magically earlier. – goldilocks Mar 25 '15 at 21:01