Attempt at a fix: https://reviews.llvm.org/D76650
On Mon, Mar 23, 2020 at 5:22 PM Lutz Justen via lldb-dev < lldb-dev@lists.llvm.org> wrote: > Sorry, the link was internal. Here's the proper on: > > https://github.com/llvm-mirror/lldb/blob/master/source/Core/FormatEntity.cpp#L861 > > > On Mon, Mar 23, 2020 at 4:00 PM Lutz Justen <ljus...@google.com> wrote: > >> Hey, >> >> 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: >> >> C++: >> const char* str = u8"đ"; >> >> LLDB: >> (lldb) expr str >> (const char *) $0 = 0x00007ff662489d18 "âĄÆĂżĂ©" >> (lldb) expr (const char*)str >> (const char *) $1 = 0x00007ff662489d18 >> "\xfffffff0\xffffff9f\xffffff98\xffffff82" >> >> To my understanding, evaluating 'str' and '(const char*)str' should be >> the same since str is already a const char*. >> >> We've found that the code takes a different path at this location: >> >> https://source.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/lldb/source/Core/FormatEntity.cpp;l=865;rcl=294541377 >> >> Any idea what's going on? We'd like to get the unescaped strings. Is it >> possible to enforce this? >> >> Thanks, >> >> - Lutz >> >> -- >> >> Dr. Lutz Justen >> >> Software Engineer >> >> ljus...@google.com >> >> >> Google Germany GmbH >> >> ABC-Str. 19 >> <https://maps.google.com/?q=ABC-Str.+19+20354+Hamburg&entry=gmail&source=g> >> >> 20354 Hamburg >> <https://maps.google.com/?q=ABC-Str.+19+20354+Hamburg&entry=gmail&source=g> >> >> GeschĂ€ftsfĂŒhrer: Paul Manicle, Halimah DeLaine Prado >> >> Registergericht und -nummer: Hamburg, HRB 86891 >> >> 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. >> >> 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. >> >> >> 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. >> >> 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. >> > > > -- > > Dr. Lutz Justen > > Software Engineer > > ljus...@google.com > > > Google Germany GmbH > > ABC-Str. 19 > <https://maps.google.com/?q=ABC-Str.+19+20354+Hamburg&entry=gmail&source=g> > > 20354 Hamburg > <https://maps.google.com/?q=ABC-Str.+19+20354+Hamburg&entry=gmail&source=g> > > GeschĂ€ftsfĂŒhrer: Paul Manicle, Halimah DeLaine Prado > > Registergericht und -nummer: Hamburg, HRB 86891 > > 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. > > 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. > > > 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. > > 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. > _______________________________________________ > lldb-dev mailing list > lldb-dev@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev > -- Jaroslav Sevcik | Software Engineer | ja...@google.com | Google Germany GmbH Erika-Mann-Str. 33 80636 MĂŒnchen GeschĂ€ftsfĂŒhrer: Paul Manicle, Halimah DeLaine Prado | Registergericht und -nummer: Hamburg, HRB 86891 | Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle AnhĂ€nge. Vielen Dank. This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev