Merge remote-tracking branch 'origin/f27' into f26

This commit is contained in:
Tom Stellard 2017-08-24 18:17:15 +00:00
commit 3deea764fa
4 changed files with 111 additions and 3 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/lldb-3.9.0.src.tar.xz
/lldb-3.9.1.src.tar.xz
/lldb-4.0.0.src.tar.xz
/lldb-4.0.1.src.tar.xz

View File

@ -1,6 +1,6 @@
Name: lldb
Version: 4.0.0
Release: 2%{?dist}
Version: 4.0.1
Release: 3%{?dist}
Summary: Next generation high-performance debugger
License: NCSA
@ -10,6 +10,8 @@ Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
ExclusiveArch: %{arm} aarch64 %{ix86} x86_64
# Patch to remove use of private llvm headers
Patch0: 0001-Fix-build-with-gcc-7.patch
# lldb: libedit produces garbled, unusable input on Linux
Patch1: r303907-libedit.patch
BuildRequires: cmake
BuildRequires: llvm-devel = %{version}
@ -20,6 +22,7 @@ BuildRequires: llvm-static = %{version}
BuildRequires: libffi-devel
BuildRequires: zlib-devel
BuildRequires: libxml2-devel
BuildRequires: libedit-devel
Requires: llvm-libs = %{version}
Requires: clang-libs = %{version}
@ -49,6 +52,7 @@ The package contains the LLDB Python module.
%setup -q -n %{name}-%{version}.src
%patch0 -p1
%patch1 -p1
# HACK so that lldb can find its custom readline.so, because we move it
# after install.
@ -75,7 +79,7 @@ CXXFLAGS="%{optflags} -Wno-error=format-security"
-DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} \
\
-DLLDB_DISABLE_CURSES:BOOL=OFF \
-DLLDB_DISABLE_LIBEDIT:BOOL=ON \
-DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
-DLLDB_DISABLE_PYTHON:BOOL=OFF \
%if 0%{?__isa_bits} == 64
-DLLVM_LIBDIR_SUFFIX=64 \
@ -119,6 +123,16 @@ rm -f %{buildroot}%{python_sitearch}/six.*
%{python_sitearch}/lldb
%changelog
* Mon Jul 31 2017 Jan Kratochvil <jan.kratochvil@redhat.com> - 4.0.1-3
- Backport lldb r303907
Resolves rhbz #1356140
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jun 26 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
- 4.0.1 Release
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild

92
r303907-libedit.patch Normal file
View File

@ -0,0 +1,92 @@
commit 9ad9480c3a380a04b3dbe869c0675d6bba37247b
Author: Kamil Rytarowski <n54@gmx.com>
Date: Thu May 25 20:12:30 2017 +0000
Fix bug #28898
lldb: libedit produces garbled, unusable input on Linux
Apply patch from Christos Zoulas, upstream libedit developer.
It has been tested on NetBSD/amd64.
New code supports combination of wide libedit and disabled
LLDB_EDITLINE_USE_WCHAR, which was the popular case on Linux
systems.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@303907 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/lldb/Host/Editline.h b/include/lldb/Host/Editline.h
index 2b1a8e0..0b75e9c 100644
--- a/include/lldb/Host/Editline.h
+++ b/include/lldb/Host/Editline.h
@@ -82,8 +82,14 @@ using EditLineStringStreamType = std::stringstream;
using EditLineCharType = char;
#endif
+#ifdef EL_CLIENTDATA /* editline with wide support + wide char read function */
+using EditLineGetCharType = wchar_t;
+#else
+using EditLineGetCharType = char;
+#endif
+
typedef int (*EditlineGetCharCallbackType)(::EditLine *editline,
- EditLineCharType *c);
+ EditLineGetCharType *c);
typedef unsigned char (*EditlineCommandCallbackType)(::EditLine *editline,
int ch);
typedef const char *(*EditlinePromptCallbackType)(::EditLine *editline);
@@ -270,7 +276,7 @@ private:
/// Character reading implementation for EditLine that supports our multi-line
/// editing trickery.
- int GetCharacter(EditLineCharType *c);
+ int GetCharacter(EditLineGetCharType *c);
/// Prompt implementation for EditLine.
const char *Prompt();
@@ -323,7 +329,7 @@ private:
/// single or multi-line editing.
void ConfigureEditor(bool multiline);
- bool CompleteCharacter(char ch, EditLineCharType &out);
+ bool CompleteCharacter(char ch, EditLineGetCharType &out);
private:
#if LLDB_EDITLINE_USE_WCHAR
diff --git a/source/Host/common/Editline.cpp b/source/Host/common/Editline.cpp
index 7d4b398..7b580dd 100644
--- a/source/Host/common/Editline.cpp
+++ b/source/Host/common/Editline.cpp
@@ -474,7 +474,7 @@ unsigned char Editline::RecallHistory(bool earlier) {
return CC_NEWLINE;
}
-int Editline::GetCharacter(EditLineCharType *c) {
+int Editline::GetCharacter(EditLineGetCharType *c) {
const LineInfoW *info = el_wline(m_editline);
// Paint a faint version of the desired prompt over the version libedit draws
@@ -969,7 +969,7 @@ void Editline::ConfigureEditor(bool multiline) {
}));
el_wset(m_editline, EL_GETCFN, (EditlineGetCharCallbackType)([](
- EditLine *editline, EditLineCharType *c) {
+ EditLine *editline, EditLineGetCharType *c) {
return Editline::InstanceFor(editline)->GetCharacter(c);
}));
@@ -1360,12 +1360,12 @@ void Editline::PrintAsync(Stream *stream, const char *s, size_t len) {
}
}
-bool Editline::CompleteCharacter(char ch, EditLineCharType &out) {
+bool Editline::CompleteCharacter(char ch, EditLineGetCharType &out) {
#if !LLDB_EDITLINE_USE_WCHAR
if (ch == (char)EOF)
return false;
- out = ch;
+ out = (unsigned char)ch;
return true;
#else
std::codecvt_utf8<wchar_t> cvt;

View File

@ -1,2 +1,3 @@
SHA512 (lldb-3.9.1.src.tar.xz) = e2957a1da60284595b21c205b07fa3db5c474bfad1935ab8e1bc832f30af497e9eb709efeb703591ef62e7dd73a28d22fc21398097a232c8a729946d72eb5df7
SHA512 (lldb-4.0.0.src.tar.xz) = 931e8c6e74b66c4ac1c56c9d067309a319aa9a9f4c72d4ed9703be3decefeb8730084ad8c3581e4e31d61cdd4074518d2ed72bacce1e689e087b2f62ad4bb2e8
SHA512 (lldb-4.0.1.src.tar.xz) = 1d94d7dfcc0614b16d0ef83436bbe814b39e34ba18394361bb9f13ad408ae9b29affa9a5d58c50c8dcd83765a39ae4d59ffabb7d8cd1358fd2fbd198b2de2ab6