<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
h1
        {mso-style-priority:9;
        mso-style-link:"\00DCberschrift 1 Zchn";
        margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:16.0pt;
        font-family:"Calibri Light",sans-serif;
        color:#2F5496;
        font-weight:normal;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.vote-count-post
        {mso-style-name:vote-count-post;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Courier New";}
span.pln
        {mso-style-name:pln;}
span.pun
        {mso-style-name:pun;}
span.str
        {mso-style-name:str;}
span.typ
        {mso-style-name:typ;}
span.lit
        {mso-style-name:lit;}
span.berschrift1Zchn
        {mso-style-name:"\00DCberschrift 1 Zchn";
        mso-style-priority:9;
        mso-style-link:"\00DCberschrift 1";
        font-family:"Calibri Light",sans-serif;
        color:#2F5496;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="DE" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">First of all, I really like Rccp and would like to thank you all for your work.</p>
<p class="MsoNormal">I try to debug an cpp file, which I source from R, using the lldb debuger.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:red">sourceCpp("source.cpp")<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Everything is woking fine, but I dont get how can I show the content of specific datatypes. Like NumericVector or CharackterVector.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><u>E.g.:<o:p></o:p></u></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">(lldb) <span style="color:red">fr v myvec gives me:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">(Rcpp::CharacterVector) myvec= {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">  Rcpp::PreserveStorage<Rcpp::Vector<4> > = (data =
<b>0x000055555899e970</b>)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">  cache = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">    p = 0x00007fffffffc070<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">  }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal"><b>How it is possible to get the values of the vector in lldb?<o:p></o:p></b></p>
<p class="MsoNormal">I think, that the struct CharacterVector only stores the Memory address of the data.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have the same problem with NumericVectors, which are stored as double.</p>
<p class="MsoNormal">If I tried to access them (format as double, 2072 bytes) but I didnīt get the expected values:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">(lldb) <span style="color:red">memory read –format f 0x000055555899e970
<o:p></o:p></span></p>
<p class="MsoNormal">(llldb) <span style="color:red">memory read -s2072 -fu -c2072 0x000055555899e970 --force</span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Maybe I have a mistake. I would be very happy if someone could help me.<o:p></o:p></p>
<p class="MsoNormal">I've already posted this question on Stackoverflow, but have not received an answer.<o:p></o:p></p>
<p class="MsoNormal">See: <a href="https://stackoverflow.com/questions/53611600/debug-rcpp-with-lldb">
https://stackoverflow.com/questions/53611600/debug-rcpp-with-lldb</a></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Bests, </p>
<p class="MsoNormal">Till</p>
</div>
</body>
</html>