[PATCH] D21987: [XRay] Implement `llvm-xray extract`, start of the llvm-xray tool
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 23:23:38 PDT 2016
dberris added a comment.
Added a couple more tests, ptal -- I haven't quite resorted to hex-editing files, but close enough with deliberately generating a bad XRay instrumentation map with a modified clang+llvm local build.
================
Comment at: tools/llvm-xray/xray-extract.cc:118-121
+ if (I->getContents(Contents))
+ return make_error<StringError>(
+ "Failed to get contents of 'xray_instr_map' section.",
+ std::make_error_code(std::errc::executable_format_error));
----------------
dblaikie wrote:
> Untested (though, granted - not sure quite how to test this, but could look further into libObject to see how getContents can fail)
I looked, and it had something to do with the ELF encoding of a file (say, if the supposed size of the section defined in the header is different in reality (through some checks)). Not sure how to properly test this yet.
https://reviews.llvm.org/D21987
More information about the llvm-commits
mailing list