summaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2019-12-17 14:51:19 +0100
committerChristian Mauderer <oss@c-mauderer.de>2019-12-18 09:11:35 +0100
commitbeeeb59cea76a347e72bc2971f5dbd1e2971e682 (patch)
tree6868bb84b59dfc0cb54f5b1fd64bb7679e08e8cd /trace
parente2c8c49a6c28f77c36596c0a28a129524c97c355 (diff)
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.
Diffstat (limited to 'trace')
-rw-r--r--trace/record/record-main-lttng.cc7
1 files changed, 6 insertions, 1 deletions
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();