[Lldb-commits] [PATCH] D37923: Implement interactive command interruption

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 19 10:56:32 PDT 2017


Python based commands will need to be able to call WasInterrupted if they are going to do their jobs.  So it would make sense to add an SBCommandInterpreter::WasInterrupted API and make sure that works.  And you can already send the interrupt with DispatchInputInterrupt.  So it should be pretty straight-forward to make a Python based command that runs forever, and start up another Python thread that just calls DispatchInputInterrupt.  The test would just be that the command returns.  That would be more direct, and wouldn't involve pexpect which has proven to be pretty fragile for anything complex.

Jim

> On Sep 19, 2017, at 10:37 AM, Greg Clayton via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> clayborg added a comment.
> 
> We should have a test. The test would need to use pexpect or something similar. If anyone has any pointer on how to make a test for this, please chime in. I was thinking just a pexpect based test.
> 
> 
> https://reviews.llvm.org/D37923
> 
> 
> 



More information about the lldb-commits mailing list