Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit eaab881

Browse files
Initial commit
Create lldb directory from 74aefd657274c03385fe076ae8f1dac1a7db202d
0 parents  commit eaab881

File tree

6,528 files changed

+1247636
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,528 files changed

+1247636
-0
lines changed

CMakeLists.txt

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
3+
include(cmake/modules/LLDBStandalone.cmake)
4+
include(cmake/modules/LLDBConfig.cmake)
5+
include(cmake/modules/AddLLDB.cmake)
6+
7+
if (__ANDROID_NDK__ OR (CMAKE_SYSTEM_NAME MATCHES "Windows"))
8+
set(LLDB_DEFAULT_DISABLE_LIBEDIT 1)
9+
else()
10+
set(LLDB_DEFAULT_DISABLE_LIBEDIT 0)
11+
endif ()
12+
13+
# We need libedit support to go down both the source and
14+
# the scripts directories.
15+
set(LLDB_DISABLE_LIBEDIT ${LLDB_DEFAULT_DISABLE_LIBEDIT} CACHE BOOL "Disables the use of editline.")
16+
if (LLDB_DISABLE_LIBEDIT)
17+
add_definitions( -DLLDB_DISABLE_LIBEDIT )
18+
endif()
19+
20+
# add_subdirectory(include)
21+
add_subdirectory(docs)
22+
if (NOT LLDB_DISABLE_PYTHON)
23+
add_subdirectory(scripts)
24+
endif ()
25+
add_subdirectory(source)
26+
add_subdirectory(test)
27+
add_subdirectory(tools)
28+
add_subdirectory(unittests)
29+
add_subdirectory(lit)
30+
31+
if (NOT LLDB_DISABLE_PYTHON)
32+
# Add a Post-Build Event to copy over Python files and create the symlink to liblldb.so for the Python API(hardlink on Windows)
33+
add_custom_target( finish_swig ALL
34+
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}/scripts" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}/scripts" "--prefix=${CMAKE_BINARY_DIR}" "--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}" -m
35+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
36+
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/scripts/lldb.py
37+
COMMENT "Python script sym-linking LLDB Python API")
38+
# We depend on liblldb being built before we can do this step.
39+
add_dependencies(finish_swig liblldb lldb-argdumper)
40+
41+
# If we build the readline module, we depend on that happening
42+
# first.
43+
if (TARGET readline)
44+
add_dependencies(finish_swig readline)
45+
endif()
46+
47+
# Ensure we do the python post-build step when building lldb.
48+
add_dependencies(lldb finish_swig)
49+
50+
# Add a Post-Build Event to copy the custom Python DLL to the lldb binaries dir so that Windows can find it when launching
51+
# lldb.exe or any other executables that were linked with liblldb.
52+
if (WIN32 AND NOT "${PYTHON_DLL}" STREQUAL "")
53+
# When using the Visual Studio CMake generator the lldb binaries end up in Release/bin, Debug/bin etc.
54+
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin" LLDB_BIN_DIR)
55+
file(TO_NATIVE_PATH "${PYTHON_DLL}" PYTHON_DLL_NATIVE_PATH)
56+
add_custom_command(
57+
TARGET finish_swig
58+
POST_BUILD
59+
COMMAND "${CMAKE_COMMAND}" -E copy ${PYTHON_DLL_NATIVE_PATH} ${LLDB_BIN_DIR}
60+
COMMENT "Copying Python DLL to LLDB binaries directory.")
61+
endif ()
62+
endif ()

CODE_OWNERS.txt

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
This file is a list of the people responsible for ensuring that patches for a
2+
particular part of LLDB are reviewed, either by themself or by someone else.
3+
They are also the gatekeepers for their part of LLDB, with the final word on
4+
what goes in or not.
5+
6+
The list is sorted by surname and formatted to allow easy grepping and
7+
beautification by scripts. The fields are: name (N), email (E), web-address
8+
(W), PGP key ID and fingerprint (P), description (D), and snail-mail address
9+
(S).
10+
11+
N: Sean Callanan
12+
13+
D: Expression evaluator, IR interpreter, Clang integration
14+
15+
N: Greg Clayton
16+
E: [email protected] (Phabricator)
17+
E: [email protected] (Direct)
18+
D: Overall LLDB architecture, Host (common+macosx), Symbol, API, ABI, Mac-specific code,
19+
D: DynamicLoader, ObjectFile, IOHandler, EditLine, ValueObject, Watchpoints, debugserver
20+
D: Build scripts, Test suite, Platform, gdb-remote, Anything not covered by this file
21+
22+
N: Enrico Granata
23+
24+
D: Data Formatters, Core/Value*, Objective C Language runtime, Test suite, Xcode build
25+
D: SWIG
26+
27+
N: Jim Ingham
28+
29+
D: Overall LLDB architecture, Thread plans, Expression parser, ValueObject, Breakpoints, ABI
30+
D: Watchpoints, Trampolines, Target, Command Interpreter, C++ / Objective C Language runtime
31+
32+
N: Ilia K
33+
34+
D: lldb-mi
35+
36+
N: Ed Maste
37+
38+
D: FreeBSD
39+
40+
N: Jason Molenda
41+
42+
D: ABI, Disassembler, Unwinding, iOS, debugserver, Platform
43+
44+
N: Hafiz Abid Qadeer
45+
46+
D: lldb-mi
47+
48+
N: Zachary Turner
49+
50+
D: CMake build, Host (common+windows), Plugins/Process/Windows, Anything Windows-specific
51+
52+
N: Oleksiy Vyalov
53+
54+
D: Linux, Android
55+
56+
N: Todd Fiala
57+
58+
D: Test Suite subsystems (concurrent test runners, test events, TestResults system), gdb-remote protocol tests
59+

INSTALL.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
LLDB Installation Instructions
2+
==============================
3+
4+
LLDB builds on Mac OS X (with Xcode) and Linux (with GCC or Clang).
5+
6+
On Mac OS X, in addition to using Xcode you'll need to enable code signing
7+
on your system to either build lldb or debug using lldb. Please see the code
8+
signing documentation in docs/code-signing.txt for more detailed directions.
9+
10+
For instructions to build LLDB on Linux, or more details about supported
11+
compiler versions, other dependencies, and build flags, see:
12+
13+
http://lldb.llvm.org/build.html

LICENSE.TXT

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
University of Illinois/NCSA
2+
Open Source License
3+
4+
Copyright (c) 2010 Apple Inc.
5+
All rights reserved.
6+
7+
Developed by:
8+
9+
LLDB Team
10+
11+
http://lldb.llvm.org/
12+
13+
Permission is hereby granted, free of charge, to any person obtaining a copy of
14+
this software and associated documentation files (the "Software"), to deal with
15+
the Software without restriction, including without limitation the rights to
16+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
17+
of the Software, and to permit persons to whom the Software is furnished to do
18+
so, subject to the following conditions:
19+
20+
* Redistributions of source code must retain the above copyright notice,
21+
this list of conditions and the following disclaimers.
22+
23+
* Redistributions in binary form must reproduce the above copyright notice,
24+
this list of conditions and the following disclaimers in the
25+
documentation and/or other materials provided with the distribution.
26+
27+
* Neither the names of the LLDB Team, copyright holders, nor the names of
28+
its contributors may be used to endorse or promote products derived from
29+
this Software without specific prior written permission.
30+
31+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
33+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34+
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
37+
SOFTWARE.
38+

Makefile

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
##===- Makefile --------------------------------------------*- Makefile -*-===##
2+
#
3+
# The LLVM Compiler Infrastructure
4+
#
5+
# This file is distributed under the University of Illinois Open Source
6+
# License. See LICENSE.TXT for details.
7+
#
8+
##===----------------------------------------------------------------------===##
9+
10+
# If LLDB_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
11+
# are being included from a subdirectory makefile.
12+
13+
ifndef LLDB_LEVEL
14+
15+
16+
IS_TOP_LEVEL := 1
17+
LLDB_LEVEL := .
18+
DIRS := include scripts source lib tools
19+
20+
PARALLEL_DIRS :=
21+
endif
22+
23+
###
24+
# Common Makefile code, shared by all LLDB Makefiles.
25+
26+
# Set LLVM source root level.
27+
LEVEL := $(LLDB_LEVEL)/../..
28+
29+
# Include LLVM common makefile.
30+
include $(LEVEL)/Makefile.common
31+
32+
# Set common LLDB build flags.
33+
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include
34+
CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/include
35+
CPP.Flags += -I$(LLVM_SRC_ROOT)/tools/clang/include
36+
CPP.Flags += -I$(LLVM_OBJ_ROOT)/tools/clang/include
37+
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source
38+
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Utility
39+
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/Utility
40+
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/POSIX
41+
42+
# Disable python and curses on mingw build
43+
ifeq ($(HOST_OS),MingW)
44+
CXXFLAGS += -DLLDB_DISABLE_PYTHON -DLLDB_DISABLE_CURSES
45+
endif
46+
47+
ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS)))
48+
# Set Python include directory
49+
PYTHON_CONFIG?= python-config
50+
PYTHON_INC_DIR = $(shell $(PYTHON_CONFIG) --includes)
51+
CPP.Flags += $(PYTHON_INC_DIR)
52+
endif
53+
54+
ifeq ($(HOST_OS),Darwin)
55+
CPP.Flags += $(subst -I,-I$(SDKROOT),$(PYTHON_INC_DIR))
56+
CPP.Flags += -F$(SDKROOT)/System/Library/Frameworks
57+
CPP.Flags += -F$(SDKROOT)/System/Library/PrivateFrameworks
58+
CPP.Flags += -I$(SDKROOT)/usr/include/libxml2
59+
endif
60+
ifdef LLDB_VENDOR
61+
CPP.Flags += -DLLDB_VENDOR='"$(LLDB_VENDOR) "'
62+
endif
63+
64+
# If building on a 32-bit system, make sure off_t can store offsets > 2GB
65+
ifneq "$(HOST_ARCH)" "x86_64"
66+
CPP.Flags += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
67+
endif
68+
69+
# Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
70+
# work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer
71+
# GCC's have false positive warnings with it on Linux (which prove a pain to
72+
# fix). For example:
73+
# http://gcc.gnu.org/PR41874
74+
# http://gcc.gnu.org/PR41838
75+
#
76+
# We can revisit this when LLVM/Clang support it.
77+
CXX.Flags += -fno-strict-aliasing
78+
79+
# Do not warn about pragmas. In particular, we are looking to ignore the
80+
# "#pragma mark" construct which GCC warns about on platforms other than Darwin.
81+
EXTRA_OPTIONS += -Wno-unknown-pragmas
82+
83+
# Drop -Wsign-compare, which we are not currently clean with.
84+
EXTRA_OPTIONS += -Wno-sign-compare
85+
86+
###
87+
# LLDB Top Level specific stuff.
88+
89+
ifeq ($(IS_TOP_LEVEL),1)
90+
91+
test::
92+
@ $(MAKE) -C test
93+
94+
#report::
95+
# @ $(MAKE) -C test report
96+
97+
#clean::
98+
# @ $(MAKE) -C test clean
99+
100+
tags::
101+
$(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
102+
grep -v /lib/Headers | grep -v /test/`
103+
104+
cscope.files:
105+
find tools lib include -name '*.cpp' \
106+
-or -name '*.def' \
107+
-or -name '*.td' \
108+
-or -name '*.h' > cscope.files
109+
110+
.PHONY: test report clean cscope.files
111+
112+
endif

0 commit comments

Comments
 (0)