From beeeb59cea76a347e72bc2971f5dbd1e2971e682 Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Tue, 17 Dec 2019 14:51:19 +0100 Subject: record: Allow to compile with recent llvm version. It seems that the API for symbolizeCode changed between llvm8 and llvm9. This patch uses the same adaption that is used for the llvm-symbolizer tool in llvm commit b2c4b8bded3ff2efaaebe0d8b33c65116f9ef8de. --- trace/record/record-main-lttng.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'trace') diff --git a/trace/record/record-main-lttng.cc b/trace/record/record-main-lttng.cc index f37106b..c84f40b 100644 --- a/trace/record/record-main-lttng.cc +++ b/trace/record/record-main-lttng.cc @@ -323,7 +323,12 @@ LTTNGClient::AddressToLineMap::iterator LTTNGClient::ResolveAddress( const ClientItem& item) { #ifdef HAVE_LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZE_H if (resolve_address_) { - auto res_or_err = symbolizer_.symbolizeCode(elf_file_, item.data); + auto res_or_err = symbolizer_.symbolizeCode(elf_file_, +#if LLVM_VERSION_MAJOR >= 9 + {item.data, llvm::object::SectionedAddress::UndefSection}); +#else + item.data); +#endif if (res_or_err) { auto info = res_or_err.get(); -- cgit v1.2.3