1 //===-- LibiptDecoder.h --======---------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_TRACE_LIBIPT_DECODER_H
10 #define LLDB_SOURCE_PLUGINS_TRACE_LIBIPT_DECODER_H
11 
12 #include "intel-pt.h"
13 
14 #include "DecodedThread.h"
15 #include "forward-declarations.h"
16 
17 namespace lldb_private {
18 namespace trace_intel_pt {
19 
20 /// Decode a raw Intel PT trace given in \p buffer and append the decoded
21 /// instructions and errors in \p decoded_thread. It uses the low level libipt
22 /// library underneath.
23 void DecodeTrace(DecodedThread &decoded_thread, TraceIntelPT &trace_intel_pt,
24                  llvm::ArrayRef<uint8_t> buffer);
25 
26 } // namespace trace_intel_pt
27 } // namespace lldb_private
28 
29 #endif // LLDB_SOURCE_PLUGINS_TRACE_LIBIPT_DECODER_H
30