GDB: Fix missing token on some responses

COOKIE FOR TOKEN 0 ALREADY EATEN (InferiorStopOk). TWO RESPONSES FOR ONE
COMMAND?

Change-Id: I569a9715f073f3fbba71045f14fa30a06cd434e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2021-09-05 09:51:08 +03:00
committed by Orgad Shaneh
parent 548e19370e
commit 7a7dc86716
2 changed files with 4 additions and 4 deletions

View File

@@ -756,7 +756,7 @@ class Dumper(DumperBase):
self.output += ',partial="%d"' % isPartial
self.output += ',counts=%s' % self.counts
self.output += ',timings=%s' % self.timings
self.reportResult(self.output)
self.reportResult(self.output, args)
def parseAndEvaluate(self, exp):
val = self.nativeParseAndEvaluate(exp)
@@ -1449,7 +1449,7 @@ class Dumper(DumperBase):
frame = frame.older()
i += 1
self.reportResult('stack={frames=[' + self.output + ']}')
self.reportResult('stack={frames=[' + self.output + ']}', args)
def createResolvePendingBreakpointsHookBreakpoint(self, args):
class Resolver(gdb.Breakpoint):
@@ -1470,7 +1470,7 @@ class Dumper(DumperBase):
def exitGdb(self, _):
gdb.execute('quit')
def reportResult(self, result, args={}):
def reportResult(self, result, args):
print('result={token="%s",%s}' % (args.get("token", 0), result))
def profile1(self, args):

View File

@@ -785,7 +785,7 @@ void GdbEngine::runCommand(const DebuggerCommand &command)
} else {
m_gdbProc.write(cmd.function.toUtf8() + "\r\n");
if (command.flags & NeedsFlush)
m_gdbProc.write("p 0\r\n");
runCommand({"p 0"});
// Start Watchdog.
if (m_commandTimer.interval() <= 20000)