I did some tests and I think it is "correct" behaviour.
Btw, there is one other report I could find that has the same issue (albeit 64bit)
https://forum.qt.io/topic/146496/qt-creator-debugger-stops-at-ldrinitshimenginedynamic/4which stops at an "int3" in ntdll:LdrInitShimEngineDynamic
That int3 is there, for whatever reason Windows put it there.
The issue only occurs (to me) if I configure FpDebug to stop at hardcoded int3.
I can set a breakpoint at the instruction before the int3, and it will be reached during startup of the app.
Googling "ntdll shim engine" brings up some reference that explain this is setting up a Windows API (kind of wrapper) so the OS acts according to the apps manifest, and other app related settings/data. => In other words, normal that the code (some shim related code) is run.
It also means it is quite plausible that different shim code is run, depending on
- the apps bitness
- a debugger present
- the debugger doing cross-bitness debugging (because certain events a reported differently to the debugger)
Which would explain why this only happens in this 32 bit cross debugging case.
With GDB you don't normally cross debug. If correctly setup, then for 32 bit debugging (under a 64 bit IDE) there is a 32bit gdb.exe. And if the gdb.exe is 32bit => then it is not cross debugging.
And iirc many versions of gdb have issues cross debugging....
But I tried with gdb 12 (latest I currently have on Windows) as 64bit gdb.
I had to run it outside the IDE => and then it stopped at the int3 too. I am not sure why it didn't when run from the IDE (but then the IDE does a ton of setup) to gdb.