Added a new format for displaying an array of characters: eFormatCharArray
This us useful because sometomes you have to show a single character as: 'a'
(using eFormatChar) and other times you might have an array of single
charcters for display as: 'a' 'b' 'c', and other times you might want to
show the contents of buffer of characters that can contain non printable
chars: "\0\x22\n123".
This also fixes an issue that currently happens when you have a single character
C string (const char *a = "a"; or char b[1] = { 'b' };) that was being output
as "'a'" incorrectly due to the way the eFormatChar format output worked.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133316 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectMemory.cpp b/source/Commands/CommandObjectMemory.cpp
index 91144e5..6bdd40b 100644
--- a/source/Commands/CommandObjectMemory.cpp
+++ b/source/Commands/CommandObjectMemory.cpp
@@ -210,6 +210,7 @@
if (!count_option_set)
m_count = 32;
break;
+ case eFormatCharArray:
case eFormatChar:
case eFormatCharPrintable:
if (!byte_size_option_set)
@@ -1062,6 +1063,7 @@
buffer.PutMaxHex64 (uval64, item_byte_size);
break;
+ case eFormatCharArray:
case eFormatChar:
case eFormatCString:
if (value_str[0])