150
|
1 ****************************************************************************
|
|
2 * README *
|
|
3 * *
|
|
4 * This file provides all the information regarding new CLI commands that *
|
|
5 * enable using various hardware features of Intel(R) architecture based *
|
|
6 * processors from LLDB's CLI. *
|
|
7 ****************************************************************************
|
|
8
|
|
9
|
|
10 ============
|
|
11 Introduction
|
|
12 ============
|
|
13 A shared library has been developed to use various hardware features of
|
|
14 Intel(R) architecture based processors through LLDB's command line. The library
|
|
15 currently comprises of hardware features namely Intel(R) Processor Trace and
|
|
16 Intel(R) Memory Protection Extensions.
|
|
17
|
|
18
|
|
19 ============
|
|
20 Details
|
|
21 ============
|
|
22 A C++ based cli wrapper (cli-wrapper.cpp) has been developed here that
|
|
23 agglomerates all cli commands for various hardware features. This wrapper is
|
|
24 build to generate a shared library (lldbIntelFeatures) to provide all these
|
|
25 commands.
|
|
26
|
|
27 For each hardware feature, separate cli commands have been developed that are
|
|
28 provided by wrappers (cli-wrapper-pt.cpp and cli-wrapper-mpxtable.cpp) residing
|
|
29 in feature specific folders ("intel-pt" and "intel-mpx" respectively).
|
|
30
|
|
31 For details regarding cli commands of each feature, please refer to these
|
|
32 feature specific wrappers.
|
|
33
|
|
34
|
|
35
|
|
36 ============
|
|
37 How to Build
|
|
38 ============
|
|
39 The shared library (lldbIntelFeatures) has a cmake based build and can be built
|
|
40 while building LLDB with cmake. "cli-wrapper.cpp" file is compiled along with all
|
|
41 the feature specific source files (residing in feature specific folders).
|
|
42
|
|
43 Furthermore, flexibility is provided to the user to include/exclude a particular
|
|
44 feature while building lldbIntelFeatures library. This is done by flags described
|
|
45 below:
|
|
46
|
|
47 - LLDB_BUILD_INTEL_PT - The flag enables building of Intel(R) Processor Trace
|
|
48 feature (inside intel-pt folder). This flag defaults to "OFF" meaning the
|
|
49 feature is excluded while building lldbIntelFeatures library. Set it to "ON"
|
|
50 in order to include it.
|
|
51
|
|
52 - LLDB_BUILD_INTEL_MPX - Enables building Intel(R) Memory Protection Extensions
|
|
53 feature (inside intel-mpx folder). This flag defaults to "ON" meaning
|
|
54 the feature is excluded while building lldbIntelFeatures library.
|
|
55
|
|
56 Please refer to README files in feature specific folders to know about additional
|
|
57 flags that need to be set in order to build that feature successfully.
|
|
58
|
|
59
|
|
60 ============
|
|
61 How to Use
|
|
62 ============
|
|
63 All CLI commands provided by this shared library can be used through the LLDB's
|
|
64 CLI by executing "plugin load <shared_lib_name>" on LLDB CLI. shared_lib_name here
|
|
65 is lldbIntelFeatures
|
|
66
|
|
67
|
|
68
|
|
69 ============
|
|
70 Description
|
|
71 ============
|
|
72 Please refer to README_CLI file of each feature to know about details of CLI
|
|
73 commands.
|