mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2026-01-03 16:53:52 +00:00
rename lldb patches
This commit is contained in:
parent
875ec1e77c
commit
1f29bf250f
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: source/Core/cxa_demangle.cpp
|
||||
===================================================================
|
||||
--- source/Core/cxa_demangle.cpp (revision 167708)
|
||||
+++ 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;
|
||||
}
|
||||
}
|
||||
60
debian/patches/r171558.diff
vendored
60
debian/patches/r171558.diff
vendored
@ -1,60 +0,0 @@
|
||||
Index: test/dotest.py
|
||||
===================================================================
|
||||
--- test/dotest.py (revision 171557)
|
||||
+++ test/dotest.py (revision 171558)
|
||||
@@ -849,6 +849,8 @@
|
||||
lines = lldb_dash_p_result.splitlines()
|
||||
if len(lines) == 1 and os.path.isfile(os.path.join(lines[0], init_in_python_dir)):
|
||||
lldbPath = lines[0]
|
||||
+ if "linux" in sys.platform:
|
||||
+ os.environ['LLDB_BUILD_DIR'] = os.path.join(lldbPath, 'lldb')
|
||||
|
||||
if not lldbPath:
|
||||
dbgPath = os.path.join(base, *(xcode3_build_dir + dbg + python_resource_dir))
|
||||
Index: source/Host/common/Host.cpp
|
||||
===================================================================
|
||||
--- source/Host/common/Host.cpp (revision 171557)
|
||||
+++ source/Host/common/Host.cpp (revision 171558)
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "llvm/Support/Host.h"
|
||||
#include "llvm/Support/MachO.h"
|
||||
+#include "llvm/ADT/Twine.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
@@ -997,13 +998,6 @@
|
||||
|
||||
case ePathTypePythonDir:
|
||||
{
|
||||
- // TODO: Anyone know how we can determine this for linux? Other systems?
|
||||
- // For linux and FreeBSD we are currently assuming the
|
||||
- // location of the lldb binary that contains this function is
|
||||
- // the directory that will contain a python directory which
|
||||
- // has our lldb module. This is how files get placed when
|
||||
- // compiling with Makefiles.
|
||||
-
|
||||
static ConstString g_lldb_python_dir;
|
||||
if (!g_lldb_python_dir)
|
||||
{
|
||||
@@ -1022,9 +1016,19 @@
|
||||
::strncpy (framework_pos, "/Resources/Python", PATH_MAX - (framework_pos - raw_path));
|
||||
}
|
||||
#else
|
||||
+ llvm::Twine python_version_dir;
|
||||
+ python_version_dir = "/python"
|
||||
+ + llvm::Twine(PY_MAJOR_VERSION)
|
||||
+ + "."
|
||||
+ + llvm::Twine(PY_MINOR_VERSION)
|
||||
+ + "/site-packages";
|
||||
+
|
||||
// We may get our string truncated. Should we protect
|
||||
// this with an assert?
|
||||
- ::strncat(raw_path, "/python", sizeof(raw_path) - strlen(raw_path) - 1);
|
||||
+
|
||||
+ ::strncat(raw_path, python_version_dir.str().c_str(),
|
||||
+ sizeof(raw_path) - strlen(raw_path) - 1);
|
||||
+
|
||||
#endif
|
||||
FileSpec::Resolve (raw_path, resolved_path, sizeof(resolved_path));
|
||||
g_lldb_python_dir.SetCString(resolved_path);
|
||||
8
debian/patches/series
vendored
8
debian/patches/series
vendored
@ -10,4 +10,10 @@ profile_rt.diff
|
||||
28-gcc-4.7-paths.diff
|
||||
29-hurd.diff
|
||||
30-kfreebsd.diff
|
||||
|
||||
50-lldb-segfaultgcc.diff
|
||||
51-lldb-hasBCPLComments.diff
|
||||
52-lldb-declaration.diff
|
||||
53-lldb-lambda.diff
|
||||
54-lldb-cpp-declaration.diff
|
||||
55-lldb-cpp-declaration.diff
|
||||
56-lldb-python-path.diff
|
||||
|
||||
Loading…
Reference in New Issue
Block a user