summaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMemory.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-06-17 23:50:44 +0000
committerGreg Clayton <gclayton@apple.com>2011-06-17 23:50:44 +0000
commit4e4294bdeee8d41b74f8ddf671aa00952b645c3d (patch)
treea65127dfa5acbb60ff3cc22537482de0ccc5bbcd /lldb/source/Commands/CommandObjectMemory.cpp
parent1240f4e53a6eb0a0f25b714d0e994137bc3d26c5 (diff)
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. llvm-svn: 133316
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 91144e5d7b4a..6bdd40bdfd02 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -210,6 +210,7 @@ public:
if (!count_option_set)
m_count = 32;
break;
+ case eFormatCharArray:
case eFormatChar:
case eFormatCharPrintable:
if (!byte_size_option_set)
@@ -1062,6 +1063,7 @@ public:
buffer.PutMaxHex64 (uval64, item_byte_size);
break;
+ case eFormatCharArray:
case eFormatChar:
case eFormatCString:
if (value_str[0])