jingham added a comment.

I think we should make simple cases like this work for sure.  But OTOH, if you 
are writing a script that you might use anywhere non-trivial, 
SBCommandInterpreter.HandleCommand(char *, SBError) is NOT a safe thing to 
call.  You could be in an lldb session with more than one Target, and while 
your command is running, the other target could have hit a breakpoint that it 
intended to stop at, and so it becomes the currently selected target.

I'm not sure there's a good way to enforce this, but if you have an execution 
context in mind when running a command with HandleCommand, you really need to 
use the version of HandleCommand that takes an execution context, rather than 
just hoping that when the command is run your execution context is still the 
currently selected one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111209

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

Reply via email to