[Lldb-commits] [PATCH] D111634: [lldb] Print embedded nuls in char arrays (PR44649)

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 17 10:08:33 PST 2022


kastiglione added a comment.

> An exception to this rule is made for the nul character at the very end of the string.

@labath What do you think of hiding //all// trailing nul characters, not just the final one? For example consider:

  char buf[16] = "hello world";
  # v buf
  # (char[16]) buf = "hello world\0\0\0\0"



1. This shows 4 out of 5 nuls, which strikes me as odd
2. None of the nuls hide any further data, so it seems friendly enough to print up to the last nul

thanks


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111634/new/

https://reviews.llvm.org/D111634



More information about the lldb-commits mailing list