[Lldb-commits] [PATCH] D101537: [lldb] Make the NSSet formatter faster and less prone to infinite recursion

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 29 10:22:16 PDT 2021


jingham added a comment.

GetPointerValue strips sign bits, so formally it should be used whenever you are getting a pointer that might be signed.  OTOH, GetPointerValue is pretty new and since plain data pointers aren't going to be signed, there was no reason to go convert all the uses.  We probably should use GetPointerValue.  Also, using GetValueAsUnsigned with a 0 fallback value is not a great idea, though it seems to have been pretty common practice.  That means if we are unable to read the pointer value for some reason, we'll say it is NULL.  I think it would be better to use LLDB_INVALID_ADDRESS in these cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101537



More information about the lldb-commits mailing list