[lldb-dev] lldb: how can I make it reliably scriptable?

Greg Clayton gclayton at apple.com
Fri Feb 20 10:56:03 PST 2015


Can you post the python file you are using to do the core file inspection? We might be able to spot some things that might be causing problems. And if you aren't using the lldb::SB API (i.e are you just doing a bunch of "SBDebugger::HandleCommand()" calls?), we might be able to help you get that part going. If you can make a core file available that fails with your script we can help figure out what is going wrong.

Greg Clayton


> On Feb 16, 2015, at 3:26 PM, Paul Smith <paul at mad-scientist.net> wrote:
> 
> On Mon, 2015-02-16 at 14:56 -0800, Enrico Granata wrote:
>> it’s hard to tell exactly what is going on in your situation without
>> further details, but
> 
> I realize this is frustrating, but it's not a simple situation since the
> the Python scripting version happens at random times; the Python crash
> is moderately reproducible (1 in 10 or so) but the hang is relatively
> rare... we never hit it during testing and it only happened after we put
> the new facility into production and we started to see hangs.
> 
>> a) is there any chance you can compile LLDB from sources and use that
>> debugger to perform your automation?
>> The LLDB you would get that way is newer than the one you are trying
>> to use right now (and we fix bugs all the time, so you do want as new
>> as you can get)
> 
> I could but it's just really tough.  I could easily see if the "lldb -s"
> bug is fixed since that's 100% reproducible if you have the right
> (wrong?) kind of core file.
> 
> We have a suite of OSX build servers (managed by Bamboo) so I'd have to
> deploy new LLDB to all of them, plus as a development team we'd have to
> agree to accept some hanging/unreliable OSX build server results for a
> while in order to try to track down this LLDB issue.  That's a tough
> sell.
> 
>> Also,
>> b) if the debugger hangs or crashes, it’s a bug and it should be fixed
>> - so, please file bugs for anything that does not work
>> And, again, if you are somewhat tracking our trunk, any and all bug
>> fixes, you get much more rapidly than staying on released Xcode
>> versions
> 
> The problem is that it's Python that crashes, and no core is generated
> (that I can see).  I'm not sure why not, or how to get more information
> about these crashes.  Also this is using the /usr/bin/python (2.7.5)
> that comes with OSX.  We have our own locally-built Python 2.7.8 and if
> I use THAT it dumps core every single time.  Not sure if this is valid.
> 
>> c) Without further details (crash logs, samples, …) it’s hard to say
>> what’s going on in your situation, so not much to comment here -
>> except that LLDB should be mature enough to script (not via the
>> command line, but using the SB API) - and anything that blocks that
>> should be filed on the LLVM bugzilla as an issue
> 
> I just don't think that I have enough information to create useful
> bugzilla entries, and I don't know if I have enough tuits to dig into
> this enough to get that information.
> 
> OK.  I'll see if I can free up any time to dig into this more deeply.
> 
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list