Hello everyone.

I just realised thing which leads to crash of debuggee in some cases. We had a 
bug in our tracker: http://youtrack.jetbrains.com/issue/OC-7389

We have some system of value renderers. Each renderer(e.g for NSCollections) 
evaluates some stuff to get info about collection elements. So does a number of 
Summary and Synthetic Providers too.
 
In SB-API it is implemented with EvaluateExpression function. One of the ways 
we can evaluate expression is to call lldb::SBFrame::EvaluateExpression() 
member function. Actually it performs execution on selected thread/frame. But 
not on the frame we call EvaluateExpression function on. It's very not obvious 
and in my opinion buggy. Usage of API in this way leads to crashes of debuggee 
process like in the ticket above. So crashes not only attempt to evaluate 
expression but attempt to get local variables with dynamic types if it executes 
target as well.

So workaround for us was to select specified thread/frame before doing 
evaluation. So does interpreter's expr command.


-- 
Andrey Zaytsev
Software Developer
JetBrains, Inc
http://www.jetbrains.com/
"Develop with pleasure!"

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

Reply via email to