forked from qt-creator/qt-creator
Dumper: Fix failing GDB startup when using MinGW
Task-number: QTCREATORBUG-13892 Change-Id: Ia843cf4d88c574013e67cacaa8484b52fdbd4b8a Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -33,8 +33,13 @@ import struct
|
||||
import sys
|
||||
import base64
|
||||
import re
|
||||
import subprocess
|
||||
import time
|
||||
try:
|
||||
import subprocess
|
||||
hasSubprocess = True
|
||||
except:
|
||||
hasSubprocess = False
|
||||
hasPlot = False
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
xrange = range
|
||||
@@ -78,18 +83,18 @@ SeparateUtf8StringFormat \
|
||||
# matplot based display for array-like structures.
|
||||
#
|
||||
try:
|
||||
# FIXME: That might not be the one we want.
|
||||
pythonExecutable = sys.executable
|
||||
subprocess.check_call([pythonExecutable, '-c', 'import matplotlib'])
|
||||
import matplotlib
|
||||
hasPlot = True
|
||||
except:
|
||||
hasPlot = False
|
||||
|
||||
|
||||
if hasSubprocess and hasPlot:
|
||||
matplotFigure = {}
|
||||
matplotCount = 0
|
||||
|
||||
devNull = open(os.devnull)
|
||||
# FIXME: That might not be the one we want.
|
||||
pythonExecutable = sys.executable
|
||||
matplotProc = subprocess.Popen(args=[pythonExecutable, "-i"],
|
||||
bufsize=0, stdin=subprocess.PIPE, stdout=devNull, stderr=devNull)
|
||||
|
||||
|
Reference in New Issue
Block a user