Commit d66e0631 authored by hjk's avatar hjk

Debugger: Make C array data plottable

Change-Id: Ib4519f0e64504ec0e3dccd89978acca5134b2932
Reviewed-by: default avatarChristian Stenger <>
parent be24c441
......@@ -948,16 +948,28 @@ class DumperBase:
self.putValue(blob, Hex8EncodedLittleEndian)
if self.currentIName in self.expandedINames:
if self.isExpanded():
# May fail on artificial items like xmm register data.
if not self.tryPutArrayContents(p, n, innerType):
#if not self.tryPutArrayContents(p, n, innerType):
with Children(self, childType=innerType, addrBase=p, addrStep=ts):
with Children(self, childType=innerType):
if hasPlot and self.isSimpleType(innerType):
show = displayFormat == ArrayPlotFormat
iname = self.currentIName
data = []
if show:
base = self.createPointerValue(p, innerType)
data = [str(base[i]) for i in range(0, n)]
matplotSend(iname, show, data)
#self.putValue(self.currentValue.value + " (not plottable)")
self.putField("plottable", "0")
def cleanAddress(self, addr):
if addr is None:
return "<no address>"
......@@ -1745,6 +1757,10 @@ class DumperBase:
self.qqEditable = {}
self.typeCache = {}
if hasPlot: # Hack for generic array type. [] is used as "type" name.
self.qqDumpers['[]'] = ""
self.qqFormats['[]'] = arrayForms()
for mod in self.dumpermodules:
m = importlib.import_module(mod)
dic = m.__dict__
......@@ -1007,6 +1007,9 @@ DisplayFormats WatchItem::typeFormatList() const
t.replace(QLatin1Char(':'), QLatin1Char('_'));
formats << watchModel()->m_reportedTypeFormats.value(t);
if (t.contains(QLatin1Char(']')))
formats << watchModel()->m_reportedTypeFormats.value(QLatin1String("[]"));
// Fixed artificial string and pointer types.
if (origaddr || isPointerType(type)) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment