Search code examples
c++assemblygccmingwinline-assembly

__asm nop for breakpoints with MinGW compiler?


I want to create stop points for debugger by __asm nop command (next step to create #define __asm nop stop) and simple use it. But it doesn't works well as it works in Visual Studio with MSVS, I cant change compiler in this project and I have to use MinGW.

I dont know right syntax for this problem in MinGW, what is the best way to implement this in MinGW/Qt?


Solution

  • The solution is to use __asm__("nop"); or asm("nop"); (suggested solution by Nate Eldredge )