Re: [lldb-dev] Why SBValue::Cast is deprecated and how to replace it with expression?

2017-01-30 Thread Jim Ingham via lldb-dev
Cast is deprecated because it isn't a real C++ cast. In particular if you cast a pointer to a base class to it's parent class, it doesn't do the work to offset the pointer to take into account the position of the base class in it's parent. All it does is extract the address of the original val

[lldb-dev] Why SBValue::Cast is deprecated and how to replace it with expression?

2017-01-29 Thread Roman Popov via lldb-dev
Hello, SBValue::Cast marked as deprecated in LLDB headers: // Deprecated - use the expression evaluator to perform type casting lldb::SBValue Cast(lldb::SBType type); But I can't understand how to replace it with expression evaluation. Suppose I have: auto casted_val = my_value.Cast(my_type);