Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Debugger help needed

Debugger help needed

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bcolling
    wrote on last edited by
    #1

    Help please,

    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:

    1. The program manually runs on the target --> I must have the cross compile tools configured correctly in Qt Creator.

      Here is the program:

      #include <stdio.h>
      int main()
      {
      for (int i=0; i < 5; i++)
      {
      printf("Hello World!\n");
      }
      return(0);
      }

      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

    2. I can manually run gdserver on the target, gdb on the client, and successfully debug --> everything is present on both platforms to allow debugging.

    3. 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.

    1 Reply Last reply
    0
    • m.sueM Offline
      m.sueM Offline
      m.sue
      wrote on last edited by
      #2

      Hi,
      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.
      -Michael.

      1 Reply Last reply
      1
      • B Offline
        B Offline
        bcolling
        wrote on last edited by
        #3

        Would I be able to manually run and debug the program if the compile flags were incorrect?

        1 Reply Last reply
        0
        • m.sueM Offline
          m.sueM Offline
          m.sue
          wrote on last edited by m.sue
          #4

          Hi,
          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 :-)
          -Michael.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bcolling
            wrote on last edited by
            #5

            I double checked all the compile and build flags, I'm pretty confident about them. Do you remember which check boxes gave you trouble?

            Thanks

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved