1 //===-- cli-wrapper.cpp -----------------------------------------*- 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 // CLI Wrapper for hardware features of Intel(R) architecture based processors 8 // to enable them to be used through LLDB's CLI. For details, please refer to 9 // cli wrappers of each individual feature, residing in their respective 10 // folders. 11 // 12 // Compile this into a shared lib and load by placing at appropriate locations 13 // on disk or by using "plugin load" command at the LLDB command line. 14 // 15 //===----------------------------------------------------------------------===// 16 17 #ifdef BUILD_INTEL_MPX 18 #include "intel-mpx/cli-wrapper-mpxtable.h" 19 #endif 20 21 #ifdef BUILD_INTEL_PT 22 #include "intel-pt/cli-wrapper-pt.h" 23 #endif 24 25 #include "lldb/API/SBDebugger.h" 26 27 namespace lldb { 28 bool PluginInitialize(lldb::SBDebugger debugger); 29 } 30 PluginInitialize(lldb::SBDebugger debugger)31bool lldb::PluginInitialize(lldb::SBDebugger debugger) { 32 33 #ifdef BUILD_INTEL_PT 34 PTPluginInitialize(debugger); 35 #endif 36 37 #ifdef BUILD_INTEL_MPX 38 MPXPluginInitialize(debugger); 39 #endif 40 41 return true; 42 } 43