JDevlieghere marked 3 inline comments as done.
JDevlieghere added inline comments.


================
Comment at: lldb/source/Target/Platform.cpp:1834
   if (error.Fail())
     return nullptr;
 
----------------
jingham wrote:
> If you fail here you leave the process hijacked.  That doesn't matter because 
> if "ConnectRemote" fails, you aren't going to have much to listen to anyway.  
> But it still looks odd.  I'm surprised we don't have some RAII-dingus for 
> process hijacking, but anyway, it's good practice to undo this in the error 
> branch.
Yeah, that's exactly my reasoning. You can't use a RAII object here, because 
the order of destruction is undefined, so you might end up calling 
`RestoreProcessEvents` after the shared pointer has been destructed. Anyway, 
I've added the call just for consistency. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83728/new/

https://reviews.llvm.org/D83728



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to