2015-03-18 06:51:21 +08:00
|
|
|
add_custom_target(LLDBUnitTests)
|
|
|
|
set_target_properties(LLDBUnitTests PROPERTIES FOLDER "LLDB tests")
|
|
|
|
|
|
|
|
include_directories(${LLDB_SOURCE_ROOT})
|
|
|
|
|
|
|
|
set(LLDB_GTEST_COMMON_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/gtest_common.h)
|
|
|
|
if (MSVC)
|
|
|
|
list(APPEND LLVM_COMPILE_FLAGS /FI ${LLDB_GTEST_COMMON_INCLUDE})
|
|
|
|
else ()
|
|
|
|
list(APPEND LLVM_COMPILE_FLAGS -include ${LLDB_GTEST_COMMON_INCLUDE})
|
|
|
|
endif ()
|
|
|
|
|
2015-03-19 00:56:24 +08:00
|
|
|
include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
|
|
|
|
2015-03-18 06:51:21 +08:00
|
|
|
function(add_lldb_unittest test_name)
|
2015-03-19 00:56:24 +08:00
|
|
|
add_unittest(LLDBUnitTests
|
|
|
|
${test_name}
|
|
|
|
${ARGN}
|
|
|
|
)
|
|
|
|
|
Add support for reading line tables from PDB files.
PDB is Microsoft's debug information format, and although we
cannot yet generate it, we still must be able to consume it.
Reason for this is that debug information for system libraries
(e.g. kernel32, C Runtime Library, etc) only have debug info
in PDB format, so in order to be able to support debugging
of system code, we must support it.
Currently this code should compile on every platform, but on
non-Windows platforms the PDB plugin will return 0 capabilities,
meaning that for now PDB is only supported on Windows. This
may change in the future, but the API is designed in such a way
that this will require few (if any) changes on the LLDB side.
In the future we can just flip a switch and everything will
work.
This patch only adds support for line tables. It does not return
information about functions, types, global variables, or anything
else. This functionality will be added in a followup patch.
Differential Revision: http://reviews.llvm.org/D17363
Reviewed by: Greg Clayton
llvm-svn: 262528
2016-03-03 06:05:52 +08:00
|
|
|
add_custom_command(
|
|
|
|
TARGET ${test_name}
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND "${CMAKE_COMMAND}" -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/Inputs)
|
|
|
|
|
2015-03-19 00:56:24 +08:00
|
|
|
lldb_link_common_libs(${test_name} EXE)
|
2015-04-27 17:26:03 +08:00
|
|
|
target_link_libraries(${test_name} ${CLANG_USED_LIBS} ${LLDB_SYSTEM_LIBS})
|
2015-03-19 00:56:24 +08:00
|
|
|
llvm_config(${test_name} ${LLVM_LINK_COMPONENTS})
|
2015-03-18 06:51:21 +08:00
|
|
|
endfunction()
|
|
|
|
|
Add support for reading line tables from PDB files.
PDB is Microsoft's debug information format, and although we
cannot yet generate it, we still must be able to consume it.
Reason for this is that debug information for system libraries
(e.g. kernel32, C Runtime Library, etc) only have debug info
in PDB format, so in order to be able to support debugging
of system code, we must support it.
Currently this code should compile on every platform, but on
non-Windows platforms the PDB plugin will return 0 capabilities,
meaning that for now PDB is only supported on Windows. This
may change in the future, but the API is designed in such a way
that this will require few (if any) changes on the LLDB side.
In the future we can just flip a switch and everything will
work.
This patch only adds support for line tables. It does not return
information about functions, types, global variables, or anything
else. This functionality will be added in a followup patch.
Differential Revision: http://reviews.llvm.org/D17363
Reviewed by: Greg Clayton
llvm-svn: 262528
2016-03-03 06:05:52 +08:00
|
|
|
function(add_unittest_inputs test_name inputs)
|
|
|
|
foreach (INPUT ${inputs})
|
|
|
|
add_custom_command(
|
|
|
|
TARGET ${test_name}
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND "${CMAKE_COMMAND}" -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Inputs/${INPUT} ${CMAKE_CURRENT_BINARY_DIR}/Inputs
|
|
|
|
COMMENT "Copying ${INPUT} to binary directory.")
|
|
|
|
endforeach()
|
|
|
|
endfunction()
|
|
|
|
|
2016-09-17 10:00:02 +08:00
|
|
|
add_subdirectory(Breakpoint)
|
2016-02-10 01:28:01 +08:00
|
|
|
add_subdirectory(Core)
|
2015-10-26 05:42:35 +08:00
|
|
|
add_subdirectory(Editline)
|
2015-11-03 03:30:40 +08:00
|
|
|
add_subdirectory(Expression)
|
2015-03-18 06:51:21 +08:00
|
|
|
add_subdirectory(Host)
|
|
|
|
add_subdirectory(Interpreter)
|
2016-08-18 16:21:38 +08:00
|
|
|
add_subdirectory(Language)
|
2016-09-17 10:00:02 +08:00
|
|
|
add_subdirectory(Platform)
|
2016-08-09 20:04:46 +08:00
|
|
|
add_subdirectory(Process)
|
Port native Python-API to 3.x
With this change, liblldb is 95% of the way towards being able
to work under both Python 2.x and Python 3.x. This should
introduce no functional change for Python 2.x, but for Python
3.x there are some important changes. Primarily, these are:
1) PyString doesn't exist in Python 3. Everything is a PyUnicode.
To account for this, PythonString now stores a PyBytes instead
of a PyString. In Python 2, this is equivalent to a PyUnicode,
and in Python 3, we do a conversion from PyUnicode to PyBytes
and store the PyBytes.
2) PyInt doesn't exist in Python 3. Everything is a PyLong. To
account for this, PythonInteger stores a PyLong instead of a
PyInt. In Python 2.x, this requires doing a conversion to
PyLong when creating a PythonInteger from a PyInt. In 3.x,
there is no PyInt anyway, so we can assume everything is a
PyLong.
3) PyFile_FromFile doesn't exist in Python 3. Instead there is a
PyFile_FromFd. This is not addressed in this patch because it
will require quite a large change to plumb fd's all the way
through the system into the ScriptInterpreter. This is the only
remaining piece of the puzzle to get LLDB supporting Python 3.x.
Being able to run the test suite is not addressed in this patch.
After the extension module can compile and you can enter an embedded
3.x interpreter, the test suite will be addressed in a followup.
llvm-svn: 249886
2015-10-10 03:45:41 +08:00
|
|
|
add_subdirectory(ScriptInterpreter)
|
2016-04-02 07:20:35 +08:00
|
|
|
add_subdirectory(Symbol)
|
Add support for reading line tables from PDB files.
PDB is Microsoft's debug information format, and although we
cannot yet generate it, we still must be able to consume it.
Reason for this is that debug information for system libraries
(e.g. kernel32, C Runtime Library, etc) only have debug info
in PDB format, so in order to be able to support debugging
of system code, we must support it.
Currently this code should compile on every platform, but on
non-Windows platforms the PDB plugin will return 0 capabilities,
meaning that for now PDB is only supported on Windows. This
may change in the future, but the API is designed in such a way
that this will require few (if any) changes on the LLDB side.
In the future we can just flip a switch and everything will
work.
This patch only adds support for line tables. It does not return
information about functions, types, global variables, or anything
else. This functionality will be added in a followup patch.
Differential Revision: http://reviews.llvm.org/D17363
Reviewed by: Greg Clayton
llvm-svn: 262528
2016-03-03 06:05:52 +08:00
|
|
|
add_subdirectory(SymbolFile)
|
2016-09-29 09:00:16 +08:00
|
|
|
add_subdirectory(UnwindAssembly)
|
2015-03-18 06:51:21 +08:00
|
|
|
add_subdirectory(Utility)
|