EpicGamesExt/raddebugger

Bug: Not able to step over/into when compiled with O2 or Ox

GloriousPtr opened this issue · 4 comments

I was doing casey's 8086 decoder exercise and found this bug:

2024-06-28.23-58-23.mp4

Repro Project: https://1drv.ms/u/s!ApjsIRdEL5T4kxrYLQeifJF54ygw?e=id2WBX

Compiled with: cl /Ox /Zi Main.cpp
Issue is observed with Ox and O2 both as stated in the title

Ah, this must be related to stepping inside the inline frames. Thanks for the report, will look into this.

This exact case is pretty aggressively inlined, so step-into won't really do what you'd expect with debug code (e.g. go directly to the first line of Execute), but the bugs have been fixed as of e80dc54. Stepping will now actually still work & make progress, it is just that e.g. the Execute function in this case has more-or-less been mangled with surrounding code entirely, so when you step-into, you'll go into an internal helper that it calls. That is pretty much par-for-the-course with optimized code, and since the bugs have been resolved, I'll close this one now.

Got it! Thanks for the explanation :)