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
Qt 6.11 is out! See what's new in the release blog

Debugging inline assembly

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.7k 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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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 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

        • Login

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