]> git.proxmox.com Git - rustc.git/commitdiff
Add lldb patch from Fedora
authorXimin Luo <infinity0@debian.org>
Mon, 28 Jan 2019 06:02:38 +0000 (22:02 -0800)
committerXimin Luo <infinity0@debian.org>
Mon, 28 Jan 2019 06:02:38 +0000 (22:02 -0800)
debian/patches/series
debian/patches/u-0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch [new file with mode: 0644]

index edba0012636e0c05ee6f71ae95af1cd74dc04c62..944ffd4a5261454174bf37cdb54f24b1df80e0b4 100644 (file)
@@ -1,6 +1,7 @@
 # Patches for upstream
 
 # pending, or forwarded
+u-0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch
 u-0001-Fix-new-renamed_and_removed_lints-warning-247.patch
 u-0001-librustc_codegen_llvm-Don-t-eliminate-empty-structs-.patch
 u-reproducible-build.patch
diff --git a/debian/patches/u-0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch b/debian/patches/u-0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch
new file mode 100644 (file)
index 0000000..78b84c2
--- /dev/null
@@ -0,0 +1,33 @@
+From d9ddc39052c91568936427e3dee087b608140cf4 Mon Sep 17 00:00:00 2001
+From: Josh Stone <jistone@redhat.com>
+Date: Tue, 8 Jan 2019 13:19:50 -0800
+Subject: [PATCH] lldb_batchmode.py: try `import _thread` for Python 3
+
+---
+ src/etc/lldb_batchmode.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py
+index 6b4c44806740..537b419b3279 100644
+--- a/src/etc/lldb_batchmode.py
++++ b/src/etc/lldb_batchmode.py
+@@ -18,10 +18,15 @@ import lldb
+ import os
+ import sys
+ import threading
+-import thread
+ import re
+ import time
++try:
++    import thread
++except ModuleNotFoundError:
++    # The `thread` module was renamed to `_thread` in Python 3.
++    import _thread as thread
++
+ # Set this to True for additional output
+ DEBUG_OUTPUT = False
+-- 
+2.20.1
+