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?

  • Did you tried handle SIGILL pass nostop ? – mpromonet Mar 25 '15 at 18:31
  • @mpromonet Since pass is by default set, it shouldn't make a difference, and it didn't make any. Same result as with handle SIGILL nostop – someonr Mar 25 '15 at 18:34
  • And there's no meaningful backtrace (bt)? 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
  • I couldn't get any meaningful backtrace (see edited question). I'll try to create a small example. Also, I'm confused that I don't get an illegal opcode without gdb. – someonr Mar 25 '15 at 19:01
  • 1
    stack seems smashed, valgrind could helps ? – mpromonet Mar 25 '15 at 19:20
up vote 4 down vote accepted

This looks exactly the same as this issue: https://github.com/raspberrypi/linux/issues/766

Fixed four days ago.

  • Sounds promising. Will test later. Thx for the information. – someonr Apr 11 '15 at 20:32
  • @someonr did you check? – Tshepang Jul 22 '15 at 11:46
  • sudo apt-get update; sudo apt-get upgrade; sudo rpi-update fixed the issue for me, allowing me to use continue and handle SIGILL nostop – morloch Aug 11 '15 at 8:02

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.