summaryrefslogtreecommitdiffstats
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
parentFix build issues on Debian 10 (diff)
downloadrtems-tools-beeeb59cea76a347e72bc2971f5dbd1e2971e682.tar.bz2
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.
-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();