summaryrefslogtreecommitdiff
path: root/lldb/source/Symbol/UnwindPlan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Symbol/UnwindPlan.cpp')
-rw-r--r--lldb/source/Symbol/UnwindPlan.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lldb/source/Symbol/UnwindPlan.cpp b/lldb/source/Symbol/UnwindPlan.cpp
index 15443ce5d8ac..e8906f38e2ff 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -1,4 +1,4 @@
-//===-- UnwindPlan.cpp ----------------------------------*- C++ -*-===//
+//===-- UnwindPlan.cpp ----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -15,6 +15,7 @@
#include "lldb/Target/Thread.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/Log.h"
+#include "llvm/DebugInfo/DWARF/DWARFExpression.h"
using namespace lldb;
using namespace lldb_private;
@@ -79,13 +80,10 @@ GetByteOrderAndAddrSize(Thread *thread) {
static void DumpDWARFExpr(Stream &s, llvm::ArrayRef<uint8_t> expr, Thread *thread) {
if (auto order_and_width = GetByteOrderAndAddrSize(thread)) {
- DataExtractor extractor(expr.data(), expr.size(), order_and_width->first,
- order_and_width->second);
- if (!DWARFExpression::PrintDWARFExpression(s, extractor,
- order_and_width->second,
- /*dwarf_ref_size*/ 4,
- /*location_expression*/ false))
- s.PutCString("invalid-dwarf-expr");
+ llvm::DataExtractor data(expr, order_and_width->first == eByteOrderLittle,
+ order_and_width->second);
+ llvm::DWARFExpression(data, order_and_width->second, llvm::dwarf::DWARF32)
+ .print(s.AsRawOstream(), nullptr, nullptr);
} else
s.PutCString("dwarf-expr");
}