Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Debugging inline assembly
Zingam last edited by
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.
You should also add which OS you are running on and which compiler/debugger you are using
ChrisW67 last edited by
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).