Oh, so it can actually be a bug? I always thought it's intended behavior (when a line of code simply cannot be displayed for some reason). Always ignored the feature, but some units like include flies (seh64.inc) or dotted unitnames (generics.collections.pas) sometimes fail to resolve properly, especially during an exception. So I should be on lookout for those...
That is a misunderstanding.
F8 should step to the next line of Pascal code. So the next line should be known, and should be reached.
(That is, unless it is at the "end;" of a function, and leaving the function, and the caller has no debug info, then there would be no source to show)
So the bug here is that F8 does not step to the next line as expected. The bug is that F8 stops somewhere else. => Then the asm Window opens. (And while there are cases, where the asm window opens incorrectly, in this case - if one ignores that the F8 failed - it would be correct).
After all, if it is "F8 step over"
in GDB going wrong, then gdb tells the IDE that your step ended at this asm statement. In other words gdb tells the IDE you wanted to purposely step to this asm statement for which no source is known. Once the IDE believes that was what you wanted, then it is correct to show the asm window.
Of course with F8 this can only happen due to the prior bug in F8.
About the asm Window in other cases.
When an exception happens and the app gets paused, then the actual "raise" in the RTL may not have debug info. Maybe not even the caller (like TStringList in classes). But some code with debug info should have called the code that caused the exception, and ideally the debugger should find it and go there. That does sometimes fail. That is a bug.
I have to check, I recall having done some work on it to improve it (but not sure how well the result was / And also how it affect gdb/lldb as it was likely tested for fpdebug).
There may be other similar cases.
Anyway, whatever the cause is. And whatever the config (gdb, fpdebug, lldb) it is always good to mention it. Even if in some case (like gdb) the chances are slim that anything can be done....
There are still - after excluding 3rd party like gdb - enough cases that simply aren't fixed because I don't know they exist. The debugger can be run in so many different setups, that it is impossible to go through all of them myself. E.g. For my development I often need an RTL with debug info. But that changes fundamentally how many things are handled in the debugger. So I don't always get the out of the box experience.