Is there a way to launch another lldb thread, so I have the command prompt and 
a python script running at the same time?

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Tuesday, September 09, 2014 5:38 PM
To: Greg Clayton
Cc: Ted Woodward; [email protected]
Subject: Re: [lldb-dev] Call python script on stop?

Yes, you definitely want to handle events yourself.  The target stop hooks are 
fine for printing some variables and threads, etc, but I wouldn't try to update 
your GUI, etc, from there.

Jim

> On Sep 9, 2014, at 3:22 PM, Greg Clayton <[email protected]> wrote:
> 
> 
>> On Sep 9, 2014, at 1:36 PM, Ted Woodward <[email protected]> wrote:
>> 
>> I’m working on a simple python gui proof-of-concept. I’m going to use the 
>> Tkinter module to open a Tk window that displays registers. I’d like to have 
>> it auto-update when the target stops.
>> 
>> Is there a way to automatically call a python script when a target stops, 
>> and to call another (to clean up) when the target is killed?
> 
> Why not just consume the events yourself?
> 
> See the following sample python code:
> 
> svn cat 
> http://llvm.org/svn/llvm-project/lldb/trunk/examples/python/process_events.py
> 
> There is a "target stop-hook" command you could use:
> 
> (lldb) help target stop-hook 
> 
> But I would suggest consuming the events on another thread from python, or 
> just making a polling loop where you want for events for a specified amount 
> of time.
> 
> Greg
> 
> 
> _______________________________________________
> lldb-dev mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev



_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to