-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb] Print embedded nuls in char arrays (PR44649)
When we know the bounds of the array, print any embedded nuls instead of treating them as terminators. An exception to this rule is made for the nul character at the very end of the string. We don't print that, as otherwise 99% of the strings would end in \0. This way the strings usually come out the same as how the user typed it into the compiler (char foo[] = "with\0nuls"). It also matches how they come out in gdb. This resolves a FIXME left from D111399, and leaves another FIXME for dealing with nul characters in "escape-non-printables=false" mode. In this mode the characters cause the entire summary string to be terminated prematurely. Differential Revision: https://reviews.llvm.org/D111634
- Loading branch information
Showing
4 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters