Commit aa221121 authored by hjk's avatar hjk

Debugger: Pass down expanded inames in LLDB tests

... as well as the 'autoderef' flag. A lot of dumper tests were
failing even though the dumpers themselves were ok.

Change-Id: I198784d95eb0004e81bfab995121e048b1722c66
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent aed9c46e
......@@ -1767,14 +1767,9 @@ class Dumper(DumperBase):
# Used in dumper auto test.
class Tester(Dumper):
def __init__(self, binary, expandedINames):
def __init__(self, binary, args):
Dumper.__init__(self)
lldb.theDumper = self
self.expandedINames = set(expandedINames)
self.passExceptions = True
self.sortStructMembers = True
self.loadDumpers({'token': 1})
error = lldb.SBError()
self.target = self.debugger.CreateTarget(binary, None, None, True, error)
......@@ -1783,14 +1778,14 @@ class Tester(Dumper):
warn("ERROR: %s" % error)
return
s = threading.Thread(target=self.testLoop, args=[])
s = threading.Thread(target=self.testLoop, args=(args,))
s.start()
s.join(30)
def reportDumpers(self, msg):
pass
def testLoop(self):
def testLoop(self, args):
# Disable intermediate reporting.
savedReport = self.report
self.report = lambda stuff: 0
......@@ -1833,7 +1828,7 @@ class Tester(Dumper):
if line != 0:
self.report = savedReport
self.process.SetSelectedThread(stoppedThread)
self.fetchVariables({'token':2, 'fancy':1})
self.fetchVariables(args)
#self.describeLocation(frame)
self.report("@NS@%s@" % self.qtNamespace())
#self.report("ENV=%s" % os.environ.items())
......
......@@ -1300,7 +1300,8 @@ void tst_Dumpers::dumper()
"python from gdbbridge import *\n"
"python theDumper.setupDumpers()\n"
"run " + nograb + "\n"
"python theDumper.fetchVariables({'fancy':1,'forcens':1,"
"python theDumper.fetchVariables({"
"'token':2,'fancy':1,'forcens':1,'sortstructs':1,"
"'autoderef':1,'dyntype':1,'passexceptions':1,"
"'expanded':[" + expandedq + "]})\n";
......@@ -1331,7 +1332,9 @@ void tst_Dumpers::dumper()
"sc sys.path.insert(1, '" + dumperDir + "')\n"
"sc from lldbbridge import *\n"
// "sc print(dir())\n"
"sc Tester('" + t->buildPath.toLatin1() + "/doit', [" + expandedq + "])\n"
"sc Tester('" + t->buildPath.toLatin1() + "/doit', {'fancy':1,'forcens':1,"
"'autoderef':1,'dyntype':1,'passexceptions':1,"
"'expanded':[" + expandedq + "]})\n"
"quit\n";
fullLldb.write(cmds);
......
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