This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Make char[N] formatters respect the end of the array (PR44649)
ClosedPublic

Authored by labath on Oct 8 2021, 4:21 AM.

Details

Summary

I believe this is a more natural behavior, and it also matches what gdb
does.

Diff Detail

Event Timeline

labath requested review of this revision.Oct 8 2021, 4:21 AM
labath created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2021, 4:21 AM
labath added inline comments.Oct 8 2021, 4:28 AM
lldb/test/API/functionalities/data-formatter/stringprinter/main.cpp
42–43

This would be consistent with gdb as well, and it was the preferred result of last years irc straw poll, but it will require a different fix.

jgorbe added a subscriber: jgorbe.Oct 8 2021, 9:09 AM
teemperor accepted this revision.Oct 8 2021, 10:11 AM

LGTM, but maybe give the test comment a FIXME.

lldb/test/API/functionalities/data-formatter/stringprinter/main.cpp
39

If you align the start of these comments when merging this, then I'll address you from now on as "Pavel the Great".

This revision is now accepted and ready to land.Oct 8 2021, 10:11 AM
labath added inline comments.Oct 11 2021, 3:47 AM
lldb/test/API/functionalities/data-formatter/stringprinter/main.cpp
39

uh-oh