This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Ignore breakpoints by default in SBFrame::EvaluateExpression
AbandonedPublic

Authored by evgeny777 on Dec 25 2015, 8:55 AM.

Details

Summary

This will help to correctly evaluate functions which throw language exceptions using lldb-mi

Diff Detail

Event Timeline

evgeny777 updated this revision to Diff 43633.Dec 25 2015, 8:55 AM
evgeny777 retitled this revision from to [lldb] Ignore breakpoints by default in SBFrame::EvaluateExpression.
evgeny777 updated this object.
evgeny777 added a reviewer: granata.enrico.

Greg, Enrico,

Can someone tell if it is possible to modify Python interface this way. Without this modification user breakpoints will be hit when someone evaluates expression and use Python interface. The lldb frontend ignores breakpoints, lldb-mi does not, becauses it uses SBFrame::EvaluateExpression in multimple places (for example in -data-evaluate-expression command). If it is not correct to apply this change in Python interface let me know - I'll implement a workaround in MI instead

evgeny777 updated this revision to Diff 46129.Jan 27 2016, 6:26 AM

It looks like this code is default constructing a SBExpressionOptions(), which at the end of the day is a fancy wrapper for EvaluateExpressionOptions

This last object gets default constructed with

m_ignore_breakpoints (false),

I wonder whether that is a useful default value to begin with. My personal preference would be to change that default to be true and then everyone would by default get it "right" for what looks to me like the most common use case.

With that said, if there is a reason for that default to be what it is (and I don't know right now and am not in the office to ask), then your patch would seem reasonable to me as long as you make the same change in all overloads of EvaluateExpression() except the one that explicitly takes an SBExpressionOptions.

evgeny777 abandoned this revision.Jan 29 2016, 9:20 AM