mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
dc8a0dcc4b
llvm-dwarfdump currently prints no message if decompression fails for some reason. I noticed that during work on one of LLD patches where LLD produced an broken output. It was a bit confusing to see no output for section dumped and no any error message at all. Patch adds error message for such cases. Differential revision: https://reviews.llvm.org/D32865 llvm-svn: 302221
16 lines
584 B
Plaintext
16 lines
584 B
Plaintext
REQUIRES: zlib
|
|
|
|
// dwarfdump-decompression-error.elf-x86-64 is prepared using following
|
|
// source code and invocation:
|
|
// test.cpp:
|
|
// int main() { return 0; }
|
|
//
|
|
// gcc test.cpp -o out -g -Wl,--compress-debug-sections,zlib
|
|
//
|
|
// After that result object was modified manually. One random byte in compressed
|
|
// content of .debug_info section was changed to 0xff. That breaks normal
|
|
// decompression flow in runtime.
|
|
RUN: llvm-dwarfdump %p/Inputs/dwarfdump-decompression-error.elf-x86-64 2>&1 | FileCheck %s
|
|
|
|
CHECK: error: failed to decompress '.debug_info', zlib error: Z_DATA_ERROR
|