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

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to