Commit 2a676664 authored by Reto Da Forno's avatar Reto Da Forno
Browse files

data trace: support for variable address (instead of name) added

parent 5fae957f
......@@ -510,6 +510,10 @@ def start_test(testid, cur, cn, obsdict_key, obsdict_id):
dwtconfs = dbgconf.xpath('d:dataTraceConf', namespaces=ns)
for dwtconf in dwtconfs:
var = dwtconf.xpath('d:variable', namespaces=ns)[0].text.strip()
# check if variable field already contains an address
if var.startswith("0x"):
varaddr = var
else:
# convert variable name to address
obskey = int(float(obsids[0]))
if obskey in symtable:
......@@ -520,7 +524,8 @@ def start_test(testid, cur, cn, obsdict_key, obsdict_id):
logger.warning("Variable %s not found in symbol table." % var)
continue
else:
logger.debug("Key %u not found in symbol table." % (obskey))
logger.warning("Key %u not found in symbol table." % (obskey))
continue
mode = dwtconf.xpath('d:mode', namespaces=ns)[0].text.strip()
xmlblock += "\t<dataTraceConf>\n\t\t<variable>%s</variable>\n\t\t<varName>%s</varName>\n\t\t<mode>%s</mode>\n\t</dataTraceConf>\n" % (varaddr, var, mode)
xmlblock += "</obsDebugConf>\n\n"
......
Supports Markdown
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