[Lldb-commits] [PATCH] D42083: [lldb][PPC64] Fixed long double variables dump

Leandro Lupori via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 16 04:38:20 PST 2018


luporl updated this revision to Diff 129939.
luporl added a comment.

Changed implementation to make only x87DoubleExtended a special case.


https://reviews.llvm.org/D42083

Files:
  source/Core/DumpDataExtractor.cpp


Index: source/Core/DumpDataExtractor.cpp
===================================================================
--- source/Core/DumpDataExtractor.cpp
+++ source/Core/DumpDataExtractor.cpp
@@ -583,8 +583,10 @@
             } else if (item_bit_size == ast->getTypeSize(ast->LongDoubleTy)) {
               const auto &semantics =
                   ast->getFloatTypeSemantics(ast->LongDoubleTy);
-              const auto byte_size =
-                  (llvm::APFloat::getSizeInBits(semantics) + 7) / 8;
+
+              offset_t byte_size = item_byte_size;
+              if (&semantics == &llvm::APFloatBase::x87DoubleExtended())
+                byte_size = (llvm::APFloat::getSizeInBits(semantics) + 7) / 8;
 
               llvm::APInt apint;
               if (GetAPInt(DE, &offset, byte_size, apint)) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42083.129939.patch
Type: text/x-patch
Size: 805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180116/f8ad9ae8/attachment.bin>


More information about the lldb-commits mailing list