Merge remote-tracking branch 'origin/master'

This commit is contained in:
Dmitry Trofimov
2014-11-19 12:50:34 +01:00
31 changed files with 154 additions and 142 deletions
+6 -4
View File
@@ -390,11 +390,13 @@ class BaseInterpreterInterface:
name = attr.split("\t")[-1]
array = pydevd_vars.evalInContext(name, self.getNamespace(), self.getNamespace())
array, metaxml, r, c, f = pydevd_vars.array_to_meta_xml(array, name, format)
xml += metaxml
format = '%' + f
if rows == -1 and cols == -1:
xml += pydevd_vars.array_to_meta_xml(array, name, format)
else:
xml += pydevd_vars.array_to_xml(array, roffset, coffset, rows, cols, format)
rows = r
cols = c
xml += pydevd_vars.array_to_xml(array, roffset, coffset, rows, cols, format)
xml += "</xml>"
return xml
+6 -4
View File
@@ -989,11 +989,13 @@ class InternalGetArray(InternalThreadCommand):
xml = "<xml>"
# need metadata
var, metaxml, rows, cols, format = pydevd_vars.array_to_meta_xml(var, self.name, self.format)
xml += metaxml
self.format = '%' + format
if self.rows == -1 and self.cols == -1:
xml += pydevd_vars.array_to_meta_xml(var, self.name, self.format)
else:
xml += pydevd_vars.array_to_xml(var, self.roffset, self.coffset, self.rows, self.cols, self.format)
self.rows = rows
self.cols = cols
xml += pydevd_vars.array_to_xml(var, self.roffset, self.coffset, self.rows, self.cols, self.format)
xml += "</xml>"
cmd = dbg.cmdFactory.makeGetArrayMessage(self.sequence, xml)
dbg.writer.addCommand(cmd)
+4 -4
View File
@@ -414,7 +414,7 @@ def array_to_xml(array, roffset, coffset, rows, cols, format):
array = array[roffset:]
rows = min(rows, len(array))
xml += "<array meta=\"%s\" rows=\"%s\" cols=\"%s\"/>" % (False, rows, cols)
xml += "<arraydata rows=\"%s\" cols=\"%s\"/>" % (rows, cols)
for row in range(rows):
xml += "<row index=\"%s\"/>" % to_string(row)
for col in range(cols):
@@ -494,9 +494,9 @@ def array_to_meta_xml(array, name, format):
bounds = (0, 0)
if type in "biufc":
bounds = (array.min(), array.max())
xml = '<array meta=\"%s\" slice=\"%s\" rows=\"%s\" cols=\"%s\" format=\"%s\" type=\"%s\" max=\"%s\" min=\"%s\"/>' % \
(True, slice, rows, cols, format, type, bounds[1], bounds[0])
return xml
xml = '<array slice=\"%s\" rows=\"%s\" cols=\"%s\" format=\"%s\" type=\"%s\" max=\"%s\" min=\"%s\"/>' % \
(slice, rows, cols, format, type, bounds[1], bounds[0])
return array, xml, rows, cols, format