Skip to content

Commit

Permalink
Add a command to access and manipulate the Intel(R) MPX Boundary Tables.
Browse files Browse the repository at this point in the history
Summary:
The Boundary Table Entries are stored in the application memory and allow
to store boundary info for all the pointers of the program, also those that
otherwise wouldn't fit in the 4 bound registers provided by the HW.

Here is an example of how it works:
 * mpx-table show <pointer>
        lbound = 0x..., ubound = 0x..., (pointer value = 0x..., metadata = 0x...)
 * mpx-table set <pointer>

Signed-off-by: Valentina Giusti <valentina.giusti@intel.com>

Reviewers: labath, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D29078

llvm-svn: 293660
  • Loading branch information
Valentina Giusti committed Jan 31, 2017
1 parent c368563 commit c0eeee7
Show file tree
Hide file tree
Showing 7 changed files with 679 additions and 0 deletions.
1 change: 1 addition & 0 deletions lldb/tools/CMakeLists.txt
Expand Up @@ -8,3 +8,4 @@ add_subdirectory(lldb-mi)
if (LLDB_CAN_USE_LLDB_SERVER)
add_subdirectory(lldb-server)
endif()
add_subdirectory(intel-mpx)
23 changes: 23 additions & 0 deletions lldb/tools/intel-mpx/CMakeLists.txt
@@ -0,0 +1,23 @@
if (NOT CMAKE_SYSTEM_NAME MATCHES "Linux")
return ()
endif ()

include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)

add_library(lldb-intel-mpxtable SHARED
IntelMPXTablePlugin.cpp
)

target_link_libraries(lldb-intel-mpxtable PUBLIC liblldb)

if (LLDB_LINKER_SUPPORTS_GROUPS)
target_link_libraries(lldb-intel-mpxtable PUBLIC
-Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
else()
target_link_libraries(lldb-intel-mpxtable PUBLIC ${LLDB_USED_LIBS})
endif()
llvm_config(lldb-intel-mpxtable ${LLVM_LINK_COMPONENTS})


install(TARGETS lldb-intel-mpxtable
LIBRARY DESTINATION bin)

0 comments on commit c0eeee7

Please sign in to comment.