diff --git a/src/plugins/debugger/lldb/guest/README b/src/plugins/debugger/lldb/guest/README index ac304f55e14c8bf58c52fe0588d765d876184ab8..be9d4fbee7aa210e13242cc405645640ab8895e0 100644 --- a/src/plugins/debugger/lldb/guest/README +++ b/src/plugins/debugger/lldb/guest/README @@ -12,18 +12,19 @@ On Mac OS X, this requires code signing. To enable LLDB debugger support in Qt Creator: -1. Change to the directory this readme is located in. - -2. To download the LLDB debugger, enter the following command: +1. To download the LLDB debugger, enter the following command: svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb -3. To sign the code, follow the instructions in lldb/docs/code-signing.txt. +2. To sign the code, follow the instructions in lldb/docs/code-signing.txt. -4. To open LLDB in Xcode for building, enter the following command: +3. To open LLDB in Xcode for building, enter the following command: open lldb.xcodeproj then select the Release target and press the build button. -5. In Xcode, press the build button. +4. In Xcode, press the build button. + +5. type the following to have the qt creator build system find your lldb build: + export WITH_LLDB=/path/to/lldb 6. To rebuild Qt Creator, change back to the top level directory of the Qt Creator source, and enter the following command: diff --git a/src/plugins/debugger/lldb/guest/qtcreator-lldb.pri b/src/plugins/debugger/lldb/guest/qtcreator-lldb.pri index ce6a7c91ad33e10f29559ac21ef6b39eacade38c..f44c3e9c849e8fba1bd00951f2dcc9dbdf739815 100644 --- a/src/plugins/debugger/lldb/guest/qtcreator-lldb.pri +++ b/src/plugins/debugger/lldb/guest/qtcreator-lldb.pri @@ -1 +1,2 @@ -macx: exists($$PWD/lldb/include/lldb/lldb-enumerations.h) : SUBDIRS += $$PWD/qtcreator-lldb.pro +WITH_LLDB = $$(WITH_LLDB) +macx: !isEmpty(WITH_LLDB) : SUBDIRS += $$PWD/qtcreator-lldb.pro diff --git a/src/plugins/debugger/lldb/guest/qtcreator-lldb.pro b/src/plugins/debugger/lldb/guest/qtcreator-lldb.pro index c885675ebc355685d304a2eae2add2e622404138..55688aad53934a610a41271bed70a816c5c2ffae 100644 --- a/src/plugins/debugger/lldb/guest/qtcreator-lldb.pro +++ b/src/plugins/debugger/lldb/guest/qtcreator-lldb.pro @@ -1,5 +1,7 @@ +WITH_LLDB = $$(WITH_LLDB) + !macx: error (This can only be built on mac) -!exists($$PWD/lldb): error(please see the README for build instructions) +!exists($${WITH_LLDB}/include/lldb/lldb-enumerations.h): error(please see the README for build instructions) include(../../../../../qtcreator.pri) TEMPLATE = app @@ -8,7 +10,6 @@ CONFIG += debug TARGET = qtcreator-lldb DEPENDPATH += . .. ../.. ../../.. ../../../../libs INCLUDEPATH += . .. ../.. ../../.. ../../../../libs -DEFINES += IPC_STANDALONE_GUEST DESTDIR = $$IDE_LIBEXEC_PATH QT = core network @@ -37,7 +38,7 @@ SOURCES += ../ipcengineguest.cpp \ LIBS += -sectcreate __TEXT __info_plist $$PWD/qtcreator-lldb.plist POSTL = rm -rf \'$${IDE_LIBEXEC_PATH}/LLDB.framework\' $$escape_expand(\\n\\t) \ - $$QMAKE_COPY_DIR lldb/build/Release/* \'$$IDE_LIBEXEC_PATH\' $$escape_expand(\\n\\t) \ + $$QMAKE_COPY_DIR $${WITH_LLDB}/build/Release/* \'$$IDE_LIBEXEC_PATH\' $$escape_expand(\\n\\t) \ install_name_tool -change '@rpath/LLDB.framework/Versions/A/LLDB' '@executable_path/LLDB.framework/Versions/A/LLDB' $(TARGET) $$escape_expand(\\n\\t) \ codesign -s lldb_codesign $(TARGET) @@ -49,8 +50,8 @@ LIBS += -framework Security -framework Python DEFINES += __STDC_LIMIT_MACROS __STDC_CONSTANT_MACROS -INCLUDEPATH += lldb/include lldb/llvm/include/ -LIBS += -F$$PWD/lldb/build/Release -framework LLDB +INCLUDEPATH += $${WITH_LLDB}/include $${WITH_LLDB}/llvm/include/ +LIBS += -F$${WITH_LLDB}/build/Release -framework LLDB # include (lldb.pri) # DEFINES += HAVE_LLDB_PRIVATE diff --git a/src/plugins/debugger/lldb/ipcengineguest.cpp b/src/plugins/debugger/lldb/ipcengineguest.cpp index 27cdf3715234380da1c605146deb4ba99dc847b2..1268a6967ebcfb9dc2ff0087cc14d1c7992bd18b 100644 --- a/src/plugins/debugger/lldb/ipcengineguest.cpp +++ b/src/plugins/debugger/lldb/ipcengineguest.cpp @@ -70,7 +70,7 @@ void IPCEngineGuest::setLocalHost(IPCEngineHost *host) void IPCEngineGuest::setHostDevice(QIODevice *device) { if (m_device) { - disconnect(m_device, SIGNAL(readyRead()), SLOT(readyRead())); + disconnect(m_device, SIGNAL(readyRead()), this, SLOT(readyRead())); delete m_device; } m_device = device; diff --git a/src/plugins/debugger/lldb/lldbhost.pri b/src/plugins/debugger/lldb/lldbhost.pri index e2f63b0b2b7b3824cc14d82974945964578c1210..31ed06dbfea959a2c7cc9973fbfd5f4935b112bf 100644 --- a/src/plugins/debugger/lldb/lldbhost.pri +++ b/src/plugins/debugger/lldb/lldbhost.pri @@ -1,3 +1,5 @@ +WITH_LLDB = $$(WITH_LLDB) + HEADERS += $$PWD/ipcenginehost.h \ $$PWD/lldbenginehost.h @@ -6,8 +8,10 @@ SOURCES += $$PWD/ipcenginehost.cpp \ INCLUDEPATH+= -DEFINES += IPC_STANDALONE_HOST - FORMS += RESOURCES += + +!isEmpty(WITH_LLDB) { + DEFINES += WITH_LLDB +}