[Lldb-commits] [PATCH] D83728: [lldb] Make `process connect` blocking in synchronous mode.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 13 16:36:42 PDT 2020


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





More information about the lldb-commits mailing list