<div dir="ltr">Hello,<div><br></div><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">SBValue::Cast marked as deprecated in LLDB headers:</p><pre class="gmail-lang-cpp gmail-prettyprint gmail-prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);color:rgb(57,51,24);word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit"><span class="gmail-com" style="margin:0px;padding:0px;border:0px;color:rgb(133,140,147)">// Deprecated - use the expression evaluator to perform type casting</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">
lldb</span><span class="gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">::</span><span class="gmail-typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">SBValue</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span class="gmail-typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Cast</span><span class="gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">lldb</span><span class="gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">::</span><span class="gmail-typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">SBType</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> type</span><span class="gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">);</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">But I can't understand how to replace it with expression evaluation.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">Suppose I have:</p><pre class="gmail-lang-cpp gmail-prettyprint gmail-prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);color:rgb(57,51,24);word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit"><span class="gmail-kwd" style="margin:0px;padding:0px;border:0px;color:rgb(16,16,148)">auto</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> casted_val </span><span class="gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">=</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> my_value</span><span class="gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">.</span><span class="gmail-typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Cast</span><span class="gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">my_type</span><span class="gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">);</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">What would be equivalent expression, taking into account that both value and type can be out of current scope?</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><br></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">Same question on stackoverflow:</p><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both"><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px"><a href="http://stackoverflow.com/questions/41928915/lldb-api-why-sbvaluecast-is-deprecated-and-how-to-replace-it-with-createvalue">http://stackoverflow.com/questions/41928915/lldb-api-why-sbvaluecast-is-deprecated-and-how-to-replace-it-with-createvalue</a></span></font><br></p><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both"><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px"><br></span></font></p><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both"><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px">Thanks in advance for help,</span></font></p><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both"><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px">-Roman</span></font></p></div></div>