mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-13 12:33:45 +00:00
revert the integration of the lldb patch (llvm/clang moved then)
This commit is contained in:
parent
844570a82c
commit
c5f616cbc1
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -13,9 +13,8 @@ llvm-toolchain-3.2 (1:3.2repack-1~exp3) experimental; urgency=low
|
||||
* Install cmake files to build LLVM extensions (Closes: #701153)
|
||||
* Remove the embedded copy of libjs-jquery (Closes: #701087)
|
||||
* Fix the install of lli manpage (Closes: #697117)
|
||||
* Sync lldb against the current trunk (too buggy in 3.2)
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Sat, 02 Mar 2013 19:23:56 +0100
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Sun, 17 Feb 2013 12:05:15 +0100
|
||||
|
||||
llvm-toolchain-3.2 (1:3.2repack-1~exp2) experimental; urgency=low
|
||||
|
||||
|
141
debian/patches/50-lldb-segfaultgcc.diff
vendored
Normal file
141
debian/patches/50-lldb-segfaultgcc.diff
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
Index: lldb-3.2/lldb/source/Core/cxa_demangle.cpp
|
||||
===================================================================
|
||||
--- lldb-3.2.orig/lldb/source/Core/cxa_demangle.cpp (revision 167708)
|
||||
+++ lldb-3.2/lldb/source/Core/cxa_demangle.cpp (working copy)
|
||||
@@ -133,9 +133,14 @@
|
||||
{
|
||||
for (int i = 0; i < 2*indent; ++i)
|
||||
printf(" ");
|
||||
- char* buf = (char*)malloc(x->size());
|
||||
+ size_t sz = x->size();
|
||||
+ char* buf = (char*)calloc(sz+10, 1);
|
||||
x->get_demangled_name(buf);
|
||||
- printf("%s %s, %p\n", typeid(*x).name(), buf, x);
|
||||
+ printf("%s [%ld] %s, %p\n", typeid(*x).name(), sz, buf, x);
|
||||
+ if (strlen(buf) != sz)
|
||||
+ {
|
||||
+ printf("strlen(buf) = %ld and size = %ld\n", strlen(buf), sz);
|
||||
+ }
|
||||
free(buf);
|
||||
display(x->__left_, indent+1);
|
||||
display(x->__right_, indent+1);
|
||||
@@ -3822,10 +3827,14 @@
|
||||
}
|
||||
virtual bool ends_with_template(bool parsing = false) const
|
||||
{
|
||||
- if (__right_ != NULL)
|
||||
+ if (__right_ && __right_->size() > 0)
|
||||
+ {
|
||||
return __right_->ends_with_template(parsing);
|
||||
- if (__left_ != NULL)
|
||||
+ }
|
||||
+ else if (__left_ && __left_->size() > 0)
|
||||
+ {
|
||||
return __left_->ends_with_template(parsing);
|
||||
+ }
|
||||
return false;
|
||||
}
|
||||
virtual bool fix_forward_references(__node** t_begin, __node** t_end)
|
||||
@@ -3932,11 +3941,11 @@
|
||||
}
|
||||
};
|
||||
|
||||
-class __lambda
|
||||
+class ___lambda_node
|
||||
: public __node
|
||||
{
|
||||
public:
|
||||
- __lambda(__node* params, const char *number, size_t number_size)
|
||||
+ ___lambda_node(__node* params, const char *number, size_t number_size)
|
||||
{
|
||||
__right_ = params;
|
||||
__name_ = number;
|
||||
@@ -6969,50 +6978,62 @@
|
||||
{
|
||||
case 't':
|
||||
case 'l':
|
||||
- first += 2;
|
||||
-
|
||||
+ {
|
||||
+ const char* t = first + 2;
|
||||
+ __node* params = 0;
|
||||
if (type == 'l')
|
||||
{
|
||||
- __root_ = 0;
|
||||
- if (first[0] == 'v')
|
||||
+ if (*t == 'v')
|
||||
{
|
||||
// void lambda
|
||||
- ++first;
|
||||
- if (first[0] == 'E')
|
||||
- ++first;
|
||||
+ ++t;
|
||||
+ if (t != last && *t == 'E')
|
||||
+ ++t;
|
||||
else
|
||||
return first;
|
||||
}
|
||||
else
|
||||
{
|
||||
- while (first[0] && first[0] != 'E')
|
||||
+ const char* t1 = __parse_type(t, last);
|
||||
+ if (t1 == t || !__make<__list>(__root_))
|
||||
+ return first;
|
||||
+ params = __root_;
|
||||
+ __node* prev = params;
|
||||
+ t = t1;
|
||||
+ while (true)
|
||||
{
|
||||
- const char *old = first;
|
||||
- first = __parse_type(first, last);
|
||||
- if (first == old)
|
||||
+ t1 = __parse_type(t, last);
|
||||
+ if (t1 == t)
|
||||
break;
|
||||
+ if (!__make<__list>(__root_))
|
||||
+ return first;
|
||||
+ t = t1;
|
||||
+ prev->__right_ = __root_;
|
||||
+ __root_->__size_ = prev->__size_ + 1;
|
||||
+ prev = __root_;
|
||||
}
|
||||
- if (first[0] == 'E')
|
||||
- ++first;
|
||||
- else
|
||||
+ if (t == last || *t != 'E')
|
||||
return first;
|
||||
+ ++t;
|
||||
}
|
||||
}
|
||||
- const char *number_start = first;
|
||||
- first = __parse_number(first, last);
|
||||
- const char *number_end = first;
|
||||
- if (first[0] == '_')
|
||||
+ const char* number_start = t;
|
||||
+ const char* number_end = __parse_number(t, last);
|
||||
+ if (number_end == last || *number_end != '_')
|
||||
+ return first;
|
||||
+ t = number_end + 1;
|
||||
+ if (type == 'l')
|
||||
{
|
||||
- ++first;
|
||||
+ if (!__make<___lambda_node>(params, number_start, static_cast<size_t>(number_end - number_start)))
|
||||
+ return first;
|
||||
}
|
||||
else
|
||||
- return first;
|
||||
-
|
||||
- if (type == 'l')
|
||||
- __make<__lambda>(__root_, number_start, static_cast<size_t>(number_end - number_start));
|
||||
- else
|
||||
- __make<__unnamed>(number_start, static_cast<size_t>(number_end - number_start));
|
||||
-
|
||||
+ {
|
||||
+ if (!__make<__unnamed>(number_start, static_cast<size_t>(number_end - number_start)))
|
||||
+ return first;
|
||||
+ }
|
||||
+ first = t;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
}
|
13
debian/patches/51-lldb-hasBCPLComments.diff
vendored
Normal file
13
debian/patches/51-lldb-hasBCPLComments.diff
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
Index: llvm-3.2.src/lldb/source/Symbol/ClangASTContext.cpp
|
||||
===================================================================
|
||||
--- llvm-3.2.src.orig/lldb/source/Symbol/ClangASTContext.cpp 2013-01-10 17:51:58.000000000 +0100
|
||||
+++ llvm-3.2.src/lldb/source/Symbol/ClangASTContext.cpp 2013-01-12 15:38:43.799057785 +0100
|
||||
@@ -257,7 +257,7 @@
|
||||
}
|
||||
|
||||
const LangStandard &Std = LangStandard::getLangStandardForKind(LangStd);
|
||||
- Opts.BCPLComment = Std.hasBCPLComments();
|
||||
+ Opts.LineComment = Std.hasLineComments();
|
||||
Opts.C99 = Std.isC99();
|
||||
Opts.CPlusPlus = Std.isCPlusPlus();
|
||||
Opts.CPlusPlus0x = Std.isCPlusPlus0x();
|
13
debian/patches/52-lldb-declaration.diff
vendored
Normal file
13
debian/patches/52-lldb-declaration.diff
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
Index: llvm-3.2.src/lldb/include/lldb/Target/StopInfo.h
|
||||
===================================================================
|
||||
--- llvm-3.2.src.orig/lldb/include/lldb/Target/StopInfo.h 2013-01-10 17:49:46.000000000 +0100
|
||||
+++ llvm-3.2.src/lldb/include/lldb/Target/StopInfo.h 2013-01-12 15:38:44.691057765 +0100
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
class StopInfo
|
||||
{
|
||||
- friend Process::ProcessEventData;
|
||||
+ friend class Process::ProcessEventData;
|
||||
friend class ThreadPlanBase;
|
||||
|
||||
public:
|
27
debian/patches/53-lldb-lambda.diff
vendored
Normal file
27
debian/patches/53-lldb-lambda.diff
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Index: lldb-3.2/lldb/source/Core/cxa_demangle.cpp
|
||||
===================================================================
|
||||
--- lldb-3.2.orig/lldb/source/Core/cxa_demangle.cpp (revision 168834)
|
||||
+++ lldb-3.2/lldb/source/Core/cxa_demangle.cpp (revision 168835)
|
||||
@@ -3932,11 +3932,11 @@
|
||||
}
|
||||
};
|
||||
|
||||
-class __lambda
|
||||
+class __lambda_node
|
||||
: public __node
|
||||
{
|
||||
public:
|
||||
- __lambda(__node* params, const char *number, size_t number_size)
|
||||
+ __lambda_node(__node* params, const char *number, size_t number_size)
|
||||
{
|
||||
__right_ = params;
|
||||
__name_ = number;
|
||||
@@ -7009,7 +7009,7 @@
|
||||
return first;
|
||||
|
||||
if (type == 'l')
|
||||
- __make<__lambda>(__root_, number_start, static_cast<size_t>(number_end - number_start));
|
||||
+ __make<__lambda_node>(__root_, number_start, static_cast<size_t>(number_end - number_start));
|
||||
else
|
||||
__make<__unnamed>(number_start, static_cast<size_t>(number_end - number_start));
|
||||
|
26
debian/patches/54-lldb-cpp-declaration.diff
vendored
Normal file
26
debian/patches/54-lldb-cpp-declaration.diff
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
Index: lldb-3.2/lldb/scripts/Python/python-wrapper.swig
|
||||
===================================================================
|
||||
--- lldb-3.2.orig/lldb/scripts/Python/python-wrapper.swig (revision 168900)
|
||||
+++ lldb-3.2/lldb/scripts/Python/python-wrapper.swig (revision 168901)
|
||||
@@ -964,6 +964,10 @@
|
||||
#include "lldb/API/SBInputReader.h"
|
||||
#include "lldb/API/SBDebugger.h"
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
size_t
|
||||
LLDBSwigPythonCallSBInputReaderCallback(void *baton,
|
||||
lldb::SBInputReader *reader,
|
||||
@@ -972,6 +976,10 @@
|
||||
size_t bytes_len);
|
||||
|
||||
void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton);
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
%}
|
||||
|
||||
%wrapper %{
|
52
debian/patches/55-lldb-cpp-declaration.diff
vendored
Normal file
52
debian/patches/55-lldb-cpp-declaration.diff
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
Index: llvm-3.2.src/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
|
||||
===================================================================
|
||||
--- llvm-3.2.src.orig/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp 2013-01-12 15:49:01.575044001 +0100
|
||||
+++ llvm-3.2.src/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp 2013-01-12 15:49:03.095043967 +0100
|
||||
@@ -344,7 +344,7 @@
|
||||
|
||||
while (*name_cursor != '\0')
|
||||
{
|
||||
- char *colon_loc = strchr(name_cursor, ':');
|
||||
+ const char *colon_loc = strchr(name_cursor, ':');
|
||||
if (!colon_loc)
|
||||
{
|
||||
selector_components.push_back(&ast_ctx.Idents.get(llvm::StringRef(name_cursor)));
|
||||
Index: llvm-3.2.src/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
|
||||
===================================================================
|
||||
--- llvm-3.2.src.orig/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp 2013-01-12 15:49:01.575044001 +0100
|
||||
+++ llvm-3.2.src/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp 2013-01-12 15:49:03.095043967 +0100
|
||||
@@ -727,7 +727,8 @@
|
||||
lldb::addr_t load_addr) :
|
||||
m_process(process),
|
||||
m_end_iterator(*this, -1ll),
|
||||
- m_load_addr(load_addr)
|
||||
+ m_load_addr(load_addr),
|
||||
+ m_classheader_size(sizeof(int32_t) * 2)
|
||||
{
|
||||
lldb::addr_t cursor = load_addr;
|
||||
|
||||
@@ -946,7 +947,7 @@
|
||||
lldb_private::Process *m_process;
|
||||
const_iterator m_end_iterator;
|
||||
lldb::addr_t m_load_addr;
|
||||
- const size_t m_classheader_size = (sizeof(int32_t) * 2);
|
||||
+ const size_t m_classheader_size;
|
||||
};
|
||||
|
||||
class ClassDescriptorV2 : public ObjCLanguageRuntime::ClassDescriptor
|
||||
Index: llvm-3.2.src/lldb/source/Interpreter/CommandObject.cpp
|
||||
===================================================================
|
||||
--- llvm-3.2.src.orig/lldb/source/Interpreter/CommandObject.cpp 2013-01-12 15:49:01.575044001 +0100
|
||||
+++ llvm-3.2.src/lldb/source/Interpreter/CommandObject.cpp 2013-01-12 15:49:03.095043967 +0100
|
||||
@@ -752,9 +752,9 @@
|
||||
StreamString sstr;
|
||||
sstr << "One of the following languages:\n";
|
||||
|
||||
- for (LanguageType l = eLanguageTypeUnknown; l < eNumLanguageTypes; ++l)
|
||||
+ for (unsigned int l = eLanguageTypeUnknown; l < eNumLanguageTypes; ++l)
|
||||
{
|
||||
- sstr << " " << LanguageRuntime::GetNameForLanguageType(l) << "\n";
|
||||
+ sstr << " " << LanguageRuntime::GetNameForLanguageType(static_cast<LanguageType>(l)) << "\n";
|
||||
}
|
||||
|
||||
sstr.Flush();
|
55
debian/patches/56-lldb-python-path.diff
vendored
Normal file
55
debian/patches/56-lldb-python-path.diff
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
Index: llvm-3.2.src/lldb/source/Utility/Makefile
|
||||
===================================================================
|
||||
--- llvm-3.2.src.orig/lldb/source/Utility/Makefile 2013-01-12 15:48:58.415044072 +0100
|
||||
+++ llvm-3.2.src/lldb/source/Utility/Makefile 2013-01-12 15:49:05.815043907 +0100
|
||||
@@ -11,4 +11,11 @@
|
||||
LIBRARYNAME := lldbUtility
|
||||
BUILD_ARCHIVE = 1
|
||||
|
||||
+# Enable RTTI on GCC builds because liblldbCore.a requires RTTI.
|
||||
+# See source/Core/Makefile for details.
|
||||
+ifeq (g++,$(shell basename $(CXX)))
|
||||
+ REQUIRES_RTTI = 1
|
||||
+endif
|
||||
+
|
||||
+
|
||||
include $(LLDB_LEVEL)/Makefile
|
||||
Index: llvm-3.2.src/lldb/source/Core/Makefile
|
||||
===================================================================
|
||||
--- llvm-3.2.src.orig/lldb/source/Core/Makefile 2013-01-12 15:48:58.415044072 +0100
|
||||
+++ llvm-3.2.src/lldb/source/Core/Makefile 2013-01-12 15:49:05.815043907 +0100
|
||||
@@ -11,4 +11,15 @@
|
||||
LIBRARYNAME := lldbCore
|
||||
BUILD_ARCHIVE = 1
|
||||
|
||||
+# Enable RTTI on GCC builds because one source file in this directory
|
||||
+# (cxa_demangle.cpp) uses dynamic_cast<> and GCC (at least 4.6 and 4.7)
|
||||
+# complain if we try to compile it with -fno-rtti. This is somewhat of a
|
||||
+# kludge because it forces us to enable RTTI in liblldbUtility.a and also
|
||||
+# link in additional clang static libraries to resolve vtable references,
|
||||
+# but actually has negligible impact on (shard object) file size.
|
||||
+$(info shell basename CXX is $(shell basename $(CXX)))
|
||||
+ifeq (g++,$(shell basename $(CXX)))
|
||||
+ REQUIRES_RTTI = 1
|
||||
+endif
|
||||
+
|
||||
include $(LLDB_LEVEL)/Makefile
|
||||
Index: llvm-3.2.src/lldb/lib/Makefile
|
||||
===================================================================
|
||||
--- llvm-3.2.src.orig/lldb/lib/Makefile 2013-01-12 15:48:58.415044072 +0100
|
||||
+++ llvm-3.2.src/lldb/lib/Makefile 2013-01-12 15:49:05.815043907 +0100
|
||||
@@ -67,6 +67,14 @@
|
||||
lldbPluginPlatformLinux.a \
|
||||
lldbPluginPlatformFreeBSD.a
|
||||
|
||||
+# Because GCC requires RTTI enabled for lldbCore (see source/Core/Makefile) it is
|
||||
+# necessary to also link the clang rewriter libraries so vtable references can
|
||||
+# be resolved correctly, if we are building with GCC.
|
||||
+ifeq (g++,$(shell basename $(CXX)))
|
||||
+ USEDLIBS += clangRewriteCore.a \
|
||||
+ clangRewriteFrontend.a
|
||||
+endif
|
||||
+
|
||||
include $(LLDB_LEVEL)/../../Makefile.config
|
||||
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
|
21
debian/patches/57-lldb-soname.diff
vendored
Normal file
21
debian/patches/57-lldb-soname.diff
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Index: llvm-toolchain-3.2-3.2/lldb/lib/Makefile
|
||||
===================================================================
|
||||
--- llvm-toolchain-3.2-3.2.orig/lldb/lib/Makefile 2013-01-13 09:30:41.000000000 +0100
|
||||
+++ llvm-toolchain-3.2-3.2/lldb/lib/Makefile 2013-01-17 18:01:01.000000000 +0100
|
||||
@@ -135,7 +135,7 @@
|
||||
endif
|
||||
endif
|
||||
|
||||
-ifeq ($(HOST_OS),Linux)
|
||||
+ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU))
|
||||
# Include everything from the .a's into the shared library.
|
||||
ProjLibsOptions := -Wl,--whole-archive $(ProjLibsOptions) \
|
||||
-Wl,--no-whole-archive
|
||||
@@ -143,6 +143,7 @@
|
||||
LLVMLibsOptions += -Wl,--no-undefined
|
||||
# Link in python
|
||||
LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt
|
||||
+ LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT).1
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),FreeBSD)
|
104092
debian/patches/58-lldb-snapshot.diff
vendored
104092
debian/patches/58-lldb-snapshot.diff
vendored
File diff suppressed because it is too large
Load Diff
8
debian/patches/series
vendored
8
debian/patches/series
vendored
@ -10,6 +10,12 @@
|
||||
profile_rt.diff
|
||||
29-hurd.diff
|
||||
30-kfreebsd.diff
|
||||
50-lldb-segfaultgcc.diff
|
||||
51-lldb-hasBCPLComments.diff
|
||||
52-lldb-declaration.diff
|
||||
54-lldb-cpp-declaration.diff
|
||||
55-lldb-cpp-declaration.diff
|
||||
56-lldb-python-path.diff
|
||||
0003-Debian-version-info-and-bugreport.patch
|
||||
0021-shared-lib-debian.patch
|
||||
0023-link-libopagent.patch
|
||||
@ -18,8 +24,8 @@ profile_rt.diff
|
||||
0046-Revert-Patch-to-set-is_stmt-a-little-better-for-prol.patch
|
||||
0047-version-name.diff
|
||||
scan-build-clang-path.diff
|
||||
57-lldb-soname.diff
|
||||
0050-powerpcspe-fp.diff
|
||||
polly-c++0x.diff
|
||||
declare_clear_cache.diff
|
||||
#r600-snapshot.diff
|
||||
58-lldb-snapshot.diff
|
||||
|
Loading…
Reference in New Issue
Block a user