[Lldb-commits] [PATCH] D133530: [lldb] Add zstd support

2022-10-12 Thread Denis Revunov via Phabricator via lldb-commits
treapster added a comment.

It seems like the new code doesn't check zstd version, thus breaking the build 
if you have something below 1.4.0.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133530

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


[Lldb-commits] [PATCH] D133530: [lldb] Add zstd support

2022-09-13 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added a comment.

Ping for unresolved issues.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133530

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


[Lldb-commits] [PATCH] D133530: [lldb] Add zstd support

2022-09-09 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Seems fine to me, though you may want to have a llvm test for the new 
functionality, given that the patch is exclusively changing llvm code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133530

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


[Lldb-commits] [PATCH] D133530: [lldb] Add zstd support

2022-09-08 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added inline comments.



Comment at: lldb/test/Shell/ObjectFile/ELF/compressed-sections-zstd.yaml:19
+Content: deadbeefbaadf00d
+## The legacy .zdebug format is not supported.
+  - Name:.zdebug_info

Delete `.zdebug`. It is unrelated to zstd



Comment at: lldb/test/Shell/ObjectFile/ELF/compressed-sections-zstd.yaml:26
+# CHECK-NEXT: Type: regular
+# CHECK: VM address: 0
+# CHECK-NEXT: VM size: 0

Align



Comment at: llvm/lib/Object/Decompressor.cpp:48
+  if (ELFCompressionSchemeId == ELFCOMPRESS_ZSTD)
+CompressionType = llvm::DebugCompressionType::Zstd;
+

Use a switch so that in the case of new compression format, the code get 
notified  due to -Wswitch



Comment at: llvm/lib/Object/Decompressor.cpp:52
 return createError("unsupported compression type");
+  if (llvm::compression::getReasonIfUnsupported(
+  compression::formatFor(CompressionType)) != nullptr) {

Just use the return type of `getReasonIfUnsupported` as the error message



Comment at: llvm/lib/Object/Decompressor.cpp:74
   size_t Size = Buffer.size();
-  return compression::zlib::uncompress(arrayRefFromStringRef(SectionData),
-   Buffer.data(), Size);
+  return compression::decompress(compression::formatFor(CompressionType),
+ arrayRefFromStringRef(SectionData),




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133530

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