jingham added a comment. In D119548#3321936 <https://reviews.llvm.org/D119548#3321936>, @labath wrote:
> In D119548#3321397 <https://reviews.llvm.org/D119548#3321397>, @ilya-nozhkin > wrote: > >> In D119548#3321357 <https://reviews.llvm.org/D119548#3321357>, @jingham >> wrote: >> >>> SBTarget.Launch calls Target::Launch. That sets up a hijacker for the >>> "stop at the first instruction" event regardless of the Sync mode. >> >> The problem that it sets up this hijacker too late. > > Yes, so maybe the fix is to set the hijacker early (?) > > That is what happens in the linux case -- hijacking is set up in > PlatformPOSIX::DebugProcess, before the process is launched. If windows does > not do that, then that would explain the bug and the differences between the > platforms. Ah, I see. I was focusing on the second event, not the original stop one. The current code is relying on getting the ProcessSP & calling HijackProcessEvents on it, but as you say, that's too late. Instead, we should put a Listener in the ProcessLaunchInfo before we do any of the CreateProcess stuff. All the calls to actually make the process in Target::Launch take a ProcessLaunchInfo, and should obey its listener. So that seems the right way to ensure that the process events get captured for this initial stop before they get a chance to leak out. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119548/new/ https://reviews.llvm.org/D119548 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits