[Lldb-commits] [PATCH] D107660: [lldb] Upstream support for Foundation constant classes
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 6 12:37:08 PDT 2021
JDevlieghere added inline comments.
================
Comment at: lldb/source/Plugins/Language/ObjC/Cocoa.cpp:509
+ float flt_value = 0.0f;
+ memcpy(&flt_value, &flt_as_int, sizeof(flt_as_int));
+ NSNumber_FormatFloat(valobj, stream, flt_value, options.GetLanguage());
----------------
jingham wrote:
> Shouldn't this be done with a DataExtractor? The code is assuming that you can get a valid host float by pasting target bytes into a host float. While most likely everybody is using the same float & double representations these days, that doesn't seem like something we should rely on.
This seems pretty common across the existing code. I agree we should fix that, but probably as a follow-up patch that fixes this across the whole file.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107660/new/
https://reviews.llvm.org/D107660
More information about the lldb-commits
mailing list