<div dir="ltr"><div>Sorry, the link was internal. Here's the proper on:</div><a href="https://github.com/llvm-mirror/lldb/blob/master/source/Core/FormatEntity.cpp#L861">https://github.com/llvm-mirror/lldb/blob/master/source/Core/FormatEntity.cpp#L861</a><br><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 23, 2020 at 4:00 PM Lutz Justen <<a href="mailto:ljusten@google.com">ljusten@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hey,</div><div><br></div><div>We've noticed that LLDB sometimes escapes certain characters (e.g. in the +128/negative range) of const char* strings and sometimes it doesn't. In particular, this happens for unicode strings:</div><div><br></div><div>C++:</div><div>const char* str = u8"😂";</div><div><br></div><div>LLDB:</div>(lldb) expr str<br>(const char *) $0 = 0x00007ff662489d18 "≡ƒÿé"<br>(lldb) expr (const char*)str<br>(const char *) $1 = 0x00007ff662489d18 "\xfffffff0\xffffff9f\xffffff98\xffffff82"<br clear="all"><div><br></div><div>To my understanding, evaluating 'str' and '(const char*)str' should be the same since str is already a const char*.</div><div><br></div><div>We've found that the code takes a different path at this location:</div><div><div><a href="https://source.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/lldb/source/Core/FormatEntity.cpp;l=865;rcl=294541377" target="_blank">https://source.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/lldb/source/Core/FormatEntity.cpp;l=865;rcl=294541377</a><br></div><div></div></div><div><br></div><div>Any idea what's going on? We'd like to get the unescaped strings. Is it possible to enforce this?</div><div><br></div><div>Thanks,</div><div><br></div><div>- Lutz</div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-family:Arial;white-space:pre-wrap"><font color="#666666">Dr. Lutz Justen</font></span><br></p><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(102,102,102);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Software Engineer</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><a href="mailto:ljusten@google.com" style="font-size:13.3333px;background-color:transparent;font-family:Arial;white-space:pre-wrap;color:rgb(17,85,204)" target="_blank">ljusten@google.com</a><br></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><br></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Google Germany GmbH</span></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="https://maps.google.com/?q=ABC-Str.+19+20354+Hamburg&entry=gmail&source=g" style="color:rgb(17,85,204)" target="_blank">ABC-Str. 19 </a></span></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="https://maps.google.com/?q=ABC-Str.+19+20354+Hamburg&entry=gmail&source=g" style="color:rgb(17,85,204)" target="_blank">20354 Hamburg</a></span></p><br style="font-size:small"><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Geschäftsführer: Paul Manicle, Halimah DeLaine Prado</span></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Registergericht und -nummer: Hamburg, HRB 86891</span></p><br style="font-size:small"><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.</span><span style="color:rgb(183,183,183);font-family:Arial;font-size:10.6667px;white-space:pre-wrap;line-height:1.38;background-color:transparent"> </span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.</span></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><br></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Der Inhalt dieser E-Mail spiegelt den derzeitigen Stand der Verhandlungen wider und dient als Basis für weitere Gespräche. Er soll keine rechtlich verbindliche Verpflichtung begründen. Eine solche Verpflichtung wird allein durch einen zwischen allen beteiligten Parteien abgeschlossenen, schriftlichen Vertrag geschaffen.</span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(183,183,183);font-family:Arial;font-size:10.6667px;white-space:pre-wrap;line-height:1.38;background-color:transparent">The above terms reflect a potential business arrangement, are provided solely as a basis for further discussion, and are not intended to be and do not constitute a legally binding obligation. No legally binding obligations will be created, implied, or inferred until an agreement in final form is executed in writing by all parties involved.</span></p></div></div></div></div></div></div></div></div></div></div></div></div></span></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-family:Arial;white-space:pre-wrap"><font color="#666666">Dr. Lutz Justen</font></span><br></p><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(102,102,102);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Software Engineer</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><a href="mailto:ljusten@google.com" style="font-size:13.3333px;background-color:transparent;font-family:Arial;white-space:pre-wrap;color:rgb(17,85,204)" target="_blank">ljusten@google.com</a><br></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><br></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Google Germany GmbH</span></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="https://maps.google.com/?q=ABC-Str.+19+20354+Hamburg&entry=gmail&source=g" style="color:rgb(17,85,204)" target="_blank">ABC-Str. 19 </a></span></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="https://maps.google.com/?q=ABC-Str.+19+20354+Hamburg&entry=gmail&source=g" style="color:rgb(17,85,204)" target="_blank">20354 Hamburg</a></span></p><br style="font-size:small"><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Geschäftsführer: Paul Manicle, Halimah DeLaine Prado</span></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Registergericht und -nummer: Hamburg, HRB 86891</span></p><br style="font-size:small"><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.</span><span style="color:rgb(183,183,183);font-family:Arial;font-size:10.6667px;white-space:pre-wrap;line-height:1.38;background-color:transparent"> </span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.</span></p><p dir="ltr" style="font-size:small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><br></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(183,183,183);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Der Inhalt dieser E-Mail spiegelt den derzeitigen Stand der Verhandlungen wider und dient als Basis für weitere Gespräche. Er soll keine rechtlich verbindliche Verpflichtung begründen. Eine solche Verpflichtung wird allein durch einen zwischen allen beteiligten Parteien abgeschlossenen, schriftlichen Vertrag geschaffen.</span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(183,183,183);font-family:Arial;font-size:10.6667px;white-space:pre-wrap;line-height:1.38;background-color:transparent">The above terms reflect a potential business arrangement, are provided solely as a basis for further discussion, and are not intended to be and do not constitute a legally binding obligation. No legally binding obligations will be created, implied, or inferred until an agreement in final form is executed in writing by all parties involved.</span></p></div></div></div></div></div></div></div></div></div></div></div></div></span></div></div></div></div></div></div></div></div>