From 4e4294bdeee8d41b74f8ddf671aa00952b645c3d Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 17 Jun 2011 23:50:44 +0000 Subject: 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 --- lldb/source/Commands/CommandObjectMemory.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/source/Commands/CommandObjectMemory.cpp') 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]) -- cgit v1.2.3