Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Debugging inline assembly
Forum Updated to NodeBB v4.3 + New Features

Debugging inline assembly

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.9k Views 1 Watching
  • 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.
  • Z Offline
    Z Offline
    Zingam
    wrote on 18 Dec 2013, 18:21 last edited by
    #1

    If I put a breakpoint before the asm directive when I trace the debugger jumps over the assembly code. Is that limitation of Qt Creator or it is something else? Can I step into the assembly code too?

    @
    int __add(int a, int b)
    {
    int result = 0;

    __asm__(
        "  mov 1,eax\n"
        "  add 2,eax\n"
        "  mov eax,0\n"
        :"=r" (result)
        :"r" (a), "r" (b)
        :"eax"
    );
    return result;
    

    }*/@

    Note: For some reason I cannot put the percent sign, so I had to remove it.

    EDIT: I use MinGW on Windows 7.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Dec 2013, 20:38 last edited by
      #2

      Hi,

      You should also add which OS you are running on and which compiler/debugger you are using

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        ChrisW67
        wrote on 18 Dec 2013, 22:56 last edited by
        #3

        By default gdb single steps by statement. It seems the assembly block is treated as a single statement. Gdb can single step by machine instruction and Qt Creator provides a toolbar control to switch to this mode (at the top of the debugging panel, at least on Linux).

        1 Reply Last reply
        0

        1/3

        18 Dec 2013, 18:21

        • Login

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