11

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?

8
  • Did you tried handle SIGILL pass nostop ?
    – mpromonet
    Mar 25, 2015 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, 2015 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, 2015 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, 2015 at 19:01
  • 1
    stack seems smashed, valgrind could helps ?
    – mpromonet
    Mar 25, 2015 at 19:20

1 Answer 1

5

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

Fixed four days ago.

3
  • Sounds promising. Will test later. Thx for the information.
    – someonr
    Apr 11, 2015 at 20:32
  • @someonr did you check?
    – tshepang
    Jul 22, 2015 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, 2015 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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