diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-07-12 22:56:10 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-07-12 22:56:10 +0000 |
commit | f4efecd9587a54e331e14b90f53ef9f2bdfcfc93 (patch) | |
tree | dc88ed6dcb21a374f270d88684ca781e7cc49f46 /lldb/source/Core/DataExtractor.cpp | |
parent | 5d11676eef4727474e6141e390c8fd20a54f1e1a (diff) | |
download | bcm5719-llvm-f4efecd9587a54e331e14b90f53ef9f2bdfcfc93.tar.gz bcm5719-llvm-f4efecd9587a54e331e14b90f53ef9f2bdfcfc93.zip |
smarter summary strings:
- formats %s %char[] %c and %a now work to print 0-terminated c-strings if they are applied to a char* or char[] even without the [] operator (e.g. ${var%s})
- array formats (char[], intN[], ..) now work when applied to an array of a scalar type even without the [] operator (e.g. ${var%int32_t[]})
LLDB will not crash because of endless loop when trying to obtain a summary for an object that has no value and references itself in its summary string
In many cases, a wrong summary string will now display an "<error>" message instead of giving out an empty string
llvm-svn: 135007
Diffstat (limited to 'lldb/source/Core/DataExtractor.cpp')
-rw-r--r-- | lldb/source/Core/DataExtractor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp index 4cc98f31a65..aea0c471fcb 100644 --- a/lldb/source/Core/DataExtractor.cpp +++ b/lldb/source/Core/DataExtractor.cpp @@ -1610,8 +1610,11 @@ DataExtractor::Dump s->Printf("0x%8.8x", GetU32 (&offset)); break; - case eFormatVectorOfChar: - s->PutChar('{'); +// please keep the single-item formats below in sync with FormatManager::GetSingleItemFormat +// if you fail to do so, users will start getting different outputs depending on internal +// implementation details they should not care about || + case eFormatVectorOfChar: // || + s->PutChar('{'); // \/ offset = Dump (s, start_offset, eFormatCharArray, 1, item_byte_size, item_byte_size, LLDB_INVALID_ADDRESS, 0, 0); s->PutChar('}'); break; |