https://bugs.winehq.org/show_bug.cgi?id=42353
Bug ID: 42353 Summary: OllyDbg Step In on a "jump to self" instruction never stops if it's the first instruction executed by debuggee Product: Wine Version: 2.0 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: dbghelp Assignee: wine-bugs@winehq.org Reporter: b7.10110111@gmail.com Distribution: ---
To reproduce
1. Launch OllyDbg (tested on 2.01) 2. Open an application, e.g. Test.exe coming in the OllyDbg distribution 3. After it loads, press <Space>, then in Assemble dialog type dw 0xfeeb and press <Enter> (or click Assemble button). This should assemble a `jmp short <ModuleEntryPoint>` instruction. 4. Close Assemble dialog 5. Press F7 (shortcut for Step In) 6. See that right-bottom corner of the window (right-hand side of status bar) has "Step in" text, which never switches back to Paused.
This result is wrong: the Step In action should set TF in EFLAGS, so that next pass of control to debuggee will trap after executing one instruction. In Windows XP OllyDbg gets control back immediately after pressing F7, while in Wine this never happens at all with `jmp short $` instruction unless EIP changes.
The same happens if instead of `EB FE` instruction you use `E9 FB FF FF FF`, which is `jmp near $`.
Note that if you press F7 before step 3, everything works as expected.