[Lldb-commits] [lldb] r224537 - We don't really handle printing embedded NULs in strings, but if we were to, we would need to have this logic inside the StringPrinter. So, add it.. For, you know, one day in the future where we might want to handle embedded NULs in strings...
Enrico Granata
egranata at apple.com
Thu Dec 18 11:43:29 PST 2014
Author: enrico
Date: Thu Dec 18 13:43:29 2014
New Revision: 224537
URL: http://llvm.org/viewvc/llvm-project?rev=224537&view=rev
Log:
We don't really handle printing embedded NULs in strings, but if we were to, we would need to have this logic inside the StringPrinter. So, add it.. For, you know, one day in the future where we might want to handle embedded NULs in strings...
Modified:
lldb/trunk/source/DataFormatters/StringPrinter.cpp
Modified: lldb/trunk/source/DataFormatters/StringPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/StringPrinter.cpp?rev=224537&r1=224536&r2=224537&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/StringPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/StringPrinter.cpp Thu Dec 18 13:43:29 2014
@@ -149,6 +149,9 @@ GetPrintableImpl<StringElementType::ASCI
switch (*buffer)
{
+ case 0:
+ retval = {"\\0",2};
+ break;
case '\a':
retval = {"\\a",2};
break;
@@ -250,6 +253,9 @@ GetPrintableImpl<StringElementType::UTF8
{
switch (codepoint)
{
+ case 0:
+ retval = {"\\0",2};
+ break;
case '\a':
retval = {"\\a",2};
break;
More information about the lldb-commits
mailing list