[Lldb-commits] [PATCH] D153644: [lldb] Print unprintable characters as unsigned
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 23 11:24:45 PDT 2023
jasonmolenda added a comment.
It seems like this patch is really avoiding the sign extension of an int8_t to int32_t in the process of being passed to printf. By casting it to unsigned we've avoided the sign extension and getting the correct result, but it seems like you could have used a printf formatter like `s.Printf("\\x%2.2hhx", c);`. I'm not opposed to solving it this way, but the description of why it's being cast to unsigned is not really clear imo.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153644/new/
https://reviews.llvm.org/D153644
More information about the lldb-commits
mailing list