[Lldb-commits] [PATCH] D50274: Misc module/dwarf logging improvements

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Aug 4 04:52:29 PDT 2018


labath added inline comments.


================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:3400-3403
+    GetModule()->ReportWarning(
+        "Unable to initialize decompressor for section '%s'",
+        section->GetName().GetCString());
+    return 0;
----------------
You have to consume the `Decompressor.takeError()` object to fulfill the `llvm::Error` contract. Easiest way to do that is to actually print it out.


================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:3407
       std::make_shared<DataBufferHeap>(Decompressor->getDecompressedSize(), 0);
   if (auto Error = Decompressor->decompress(
           {reinterpret_cast<char *>(buffer_sp->GetBytes()),
----------------
Same here.


================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:3413
+        section->GetName().GetCString());
+    return 0;
   }
----------------
`lit/Modules/compressed-sections.yaml` test will need to be updated to account for the return 0.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D50274





More information about the lldb-commits mailing list