[lldb-dev] Threading model for Python API
Christian Biesinger via lldb-dev
lldb-dev at lists.llvm.org
Mon Aug 5 09:20:35 PDT 2019
OK thanks! (If I try to get, for example, the local variables while
the process is running, will that fail or "succeed" in a weird way?)
Christian
On Mon, Aug 5, 2019 at 11:15 AM Greg Clayton <clayborg at gmail.com> wrote:
>
> The API is thread safe, but you can run into interesting issues if you don't thread things right. You don't want one thread stepping and another thread resuming. It will work, but you probably will have a tough time figuring out why certain functions return certain values. Also, you don't want one thread resuming a process while another things the process is stopped and tries to get and display local variables.
>
> So yes the API is thread safe, but be careful with how you use things.
>
> Greg
>
> > On Aug 5, 2019, at 8:59 AM, Christian Biesinger via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> >
> > Hi there!
> >
> > I was wondering what the threading model is for the Python API (when
> > running inside of LLDB, in implementing a command)?
> >
> > For example: If I create a Python thread in my command, how do I
> > access the LLDB API? Is there an equivalent of gdb's post_event
> > function to run it on the main thread? Or is the API threadsafe?
> >
> > I tried to look for documentation on this but was unsuccessful.
> >
> > Thanks!
> > Christian
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
More information about the lldb-dev
mailing list