Add support for LLDB scripts.
When trying to run an LLDB script I get the following :
(LLDB) command script import ~/lldbinit.py
error: module importing failed: This script interpreter does not support importing modules.
(LLDB) script
In the first case it doesn't import the script while in the second it doesn't show the Python interpreter.
Currently the lldb is built without python support. I will address this in a future release
Okay perfect, personally I don't find a reason on not having python support. I don't know if there is a deeper reason from your side.
There is no deep reason on this. I just tried to compile LLDB with the most basic things initially to make it work. So I did not even think about Python at that time.
When I think about it now, I do see a potential problem is that BN already loads a python module. I am not sure whether the two can live with each other peacefully.
I will try to compile lldb with Python support to see if it works or what error it throws.
I built lldb 14.0.6 from git with python support and it crashed when I tried to import a python script. I was able to build and replace all the files inside the plugins/lldb preexisting folder but for some reason I couldn't find the lldb-server executable so I used the one you provided.
The lldb-server is not used for regular debugging right now. We will need it in the future when we do remote debugging.
For LLDB, we are building 14.0.0. Not sure if the difference is causing the crash. Also, since the debuggercore is linking with the LLDB API, there might be ABI compatibility issues as well.
You mentioned that it crashes when importing a python script. Does it work normally if you just do the debugging as usual?
Yes, if I remember correctly it works normally when you debug as usual
Are there any plans for this issue? In particular, the LLDB APIs regarding allocating memory within the target process would be helpful for my research, and only seem reachable from the lldb script interface.
Thank you.