| Issue |
170030
|
| Summary |
[LLDB] eFormatBytesWithASCII output is unintuitive and confusing
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Walnut356
|
Specifically the "ascii" part. I would expect the latter half to be identical to the output of `eFormatChar`, but it is not. It instead seems to follow `eFormatCharPrintable`, which has the same unintuitive behavior. There are 2 issues:
1. characters are not delimited, making the space character (0x20) "invisible"
2. non-printable characters are printed as a period, presumably due to [this](https://github.com/llvm/llvm-project/blob/22257e8d6ed5600d9c689fecbd17ea68e9d08a6f/lldb/source/Core/DumpDataExtractor.cpp#L51), which can easily be confused with an *actual* period character.
With delimiters (e.g. `eFormatChar` which prints with single quotes: `'a'`) non-printable chars could just be empty single-quotes `''`, and printable periods would no longer be ambiguous. Also, known escape sequences ([these](https://github.com/llvm/llvm-project/blob/22257e8d6ed5600d9c689fecbd17ea68e9d08a6f/lldb/source/Core/DumpDataExtractor.cpp#L173)) should be printed instead of the fallback "non-printable" value.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs