> On Aug 5, 2019, at 9:20 AM, Christian Biesinger <cbiesin...@google.com> wrote: > > 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?)
You will get an empty list. But if you get the list of variables on thread 1, then thread 2 continues, and back on thread 1 you ask each value in the lldb::SBValueList for their values, you will get fail values or no values when you ask. Mainly common sense kind of stuff, but just something to be aware of. > > Christian > > On Mon, Aug 5, 2019 at 11:15 AM Greg Clayton <clayb...@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@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@lists.llvm.org >>> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev >> _______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev