diff options
author | Jaroslav Sevcik <jarin@google.com> | 2020-03-24 14:08:39 +0100 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2020-03-24 14:25:59 +0100 |
commit | 177dd63c8d742250dac6ea365e7c30f0fbab3257 (patch) | |
tree | d55bc5b0fbd02e739e743f900c7efdb3d4bc5d0c /lldb/source/Plugins/ScriptInterpreter/Python | |
parent | 865638f5eb57d2a16f4acef7237c54bc6059fae0 (diff) | |
download | llvm-177dd63c8d742250dac6ea365e7c30f0fbab3257.zip llvm-177dd63c8d742250dac6ea365e7c30f0fbab3257.tar.gz llvm-177dd63c8d742250dac6ea365e7c30f0fbab3257.tar.bz2 |
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
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions