diff options
| author | Enrico Granata <egranata@apple.com> | 2014-11-05 21:20:48 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2014-11-05 21:20:48 +0000 |
| commit | ebdc1ac0148424ae5716288c5c592a88629b13b1 (patch) | |
| tree | 9777de973f8a73da3bf2ce10d9c8d7a0939bd92c /lldb/source/DataFormatters/StringPrinter.cpp | |
| parent | d4bc0bf3a3cdc8c4257bfc6728f873677f690d03 (diff) | |
Add a setting escape-non-printables that drives whether the StringPrinter should or should not escape sequences such as \t, \n, .. and generally any non-printing character
The recent StringPrinter changes made this behavior the default, and the setting defaults to yes
If you want to change this behavior and see non-printables unescaped (e.g. "a\tb" as "a b"), set it to false
Fixes rdar://12969594
llvm-svn: 221399
Diffstat (limited to 'lldb/source/DataFormatters/StringPrinter.cpp')
| -rw-r--r-- | lldb/source/DataFormatters/StringPrinter.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp index 2b59b1601977..be08cf2750a7 100644 --- a/lldb/source/DataFormatters/StringPrinter.cpp +++ b/lldb/source/DataFormatters/StringPrinter.cpp @@ -10,7 +10,9 @@ #include "lldb/DataFormatters/StringPrinter.h" #include "lldb/Core/DataExtractor.h" +#include "lldb/Core/Debugger.h" #include "lldb/Core/Error.h" +#include "lldb/Core/ValueObject.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" @@ -416,6 +418,19 @@ DumpUTFBufferToStream (ConversionResult (*ConvertFunction) (const SourceDataType return true; } +lldb_private::formatters::ReadStringAndDumpToStreamOptions::ReadStringAndDumpToStreamOptions (ValueObject& valobj) : + ReadStringAndDumpToStreamOptions() +{ + SetEscapeNonPrintables(valobj.GetTargetSP()->GetDebugger().GetEscapeNonPrintables()); +} + +lldb_private::formatters::ReadBufferAndDumpToStreamOptions::ReadBufferAndDumpToStreamOptions (ValueObject& valobj) : + ReadBufferAndDumpToStreamOptions() +{ + SetEscapeNonPrintables(valobj.GetTargetSP()->GetDebugger().GetEscapeNonPrintables()); +} + + namespace lldb_private { |
