llvm-project/lldb/test/API/functionalities/data-formatter
Jaroslav Sevcik 177dd63c8d Data formatters: fix detection of C strings
Summary:
Detection of C strings does not work well for pointers. If the value object holding a (char*) pointer does not have an address (e.g., if it is a temp), the value is not considered a C string and its formatting is left to DumpDataExtractor rather than the special handling in  ValueObject::DumpPrintableRepresentation. This leads to inconsistent outputs, e.g., in escaping non-ASCII characters. See the test for an example; the second test expectation is not met (without this patch). With this patch, the C string detection only insists that the pointer value is valid. The patch makes the code consistent with how the pointer is obtained in ValueObject::ReadPointedString.

Reviewers: teemperor

Reviewed By: teemperor

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D76650
2020-03-24 14:25:59 +01:00
..
array_typedef
boolreference [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
compactvectors [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
cstring-utf8-summary Data formatters: fix detection of C strings 2020-03-24 14:25:59 +01:00
data-formatter-advanced [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-caching
data-formatter-categories [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-cpp [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-disabling
data-formatter-enum-format
data-formatter-globals [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-named-summaries [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-objc Reland [lldb] Fix string summary of an empty NSPathStore2 2020-03-19 18:50:26 +01:00
data-formatter-proper-plurals [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-ptr-to-array [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-python-synth
data-formatter-script [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-skip-summary
data-formatter-smart-array [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-stl [DataFormatters] Add formatter for libc++ std::unique_ptr 2020-03-23 11:48:20 -07:00
data-formatter-synth [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
data-formatter-synthtype
data-formatter-synthval
dump_dynamic [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
format-propagation [lldb] Replace assertTrue(a == b, "msg") with assertEquals(a, b, "msg") in the test suite 2020-02-13 15:00:55 +01:00
frameformat_smallstruct [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
hexcaps [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
language_category_updates [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
nsarraysynth [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
nsdictionarysynth [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
nssetsynth [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
ostypeformatting [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
parray [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
poarray [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
ptr_ref_typedef [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
pyobjsynthprovider [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
refpointer-recursion
setvaluefromcstring [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
stringprinter [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
summary-string-onfail [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
synthcapping
synthupdate [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
type_summary_list_arg
type_summary_list_script
typedef_array [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
user-format-vs-summary [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
var-in-aggregate-misuse [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
varscript_formatting
vector-types [lldb] Remove license headers from all test source files 2020-02-20 08:32:01 +01:00
.categories