forked from qt-creator/qt-creator
Debugger: Consolidate some GDB-through-Python interaction
Instead of calling a GDB extension command invoking a function on the well-known Dumper instance, call the Dumper function directly. This also makes the code more similar to the LLDB side. Change-Id: I4b23177eb72a904721b63c578ce7fbfe204f02a2 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -1696,6 +1696,10 @@ class Dumper(DumperBase):
|
||||
|
||||
self.qmlBreakpoints.append(Resolver(self, args))
|
||||
|
||||
def exitGdb(self, _):
|
||||
if hasPlot:
|
||||
matplotQuit()
|
||||
gdb.execute("quit")
|
||||
|
||||
|
||||
class CliDumper(Dumper):
|
||||
@@ -1860,17 +1864,6 @@ def threadnames(arg):
|
||||
|
||||
registerCommand("threadnames", threadnames)
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# Reload Command
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
def reloadDumper(_):
|
||||
theDumper.reloadDumper();
|
||||
|
||||
registerCommand("reload", reloadDumper)
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# StackFrames Command
|
||||
@@ -1891,25 +1884,6 @@ def stackListFrames(arg):
|
||||
|
||||
registerCommand("stackListFrames", stackListFrames)
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# AddExtraDumpers Command
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
def addExtraDumper(args):
|
||||
theDumper.addDumperModule(args)
|
||||
|
||||
registerCommand("addExtraDumper", addExtraDumper)
|
||||
|
||||
def exitGdb(arg):
|
||||
if hasPlot:
|
||||
matplotQuit()
|
||||
gdb.execute("quit")
|
||||
return ""
|
||||
|
||||
registerCommand("exitGdb", exitGdb)
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# Native Mixed
|
||||
|
||||
Reference in New Issue
Block a user