summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-02-13 15:45:19 +0100
committerhjk <hjk@theqtcompany.com>2015-02-13 15:01:39 +0000
commit5442d144b65efd873e851f540512c2c19c010cba (patch)
treebfd43da7fd3e301c89b861c8dea8f347722f8972
parentee4cbafb0b5471a1bfed16f9b16d9598a0afb78e (diff)
downloadqt-creator-5442d144b65efd873e851f540512c2c19c010cba.tar.gz
Debugger: Hide PdbEngine infrastructure from itself
Debuggers running inside the debugged application are weird. Change-Id: I2452e3653221c8f585123852ea113bd2fdfd08ed Reviewed-by: hjk <hjk@theqtcompany.com>
-rw-r--r--share/qtcreator/debugger/pdbbridge.py14
-rw-r--r--src/plugins/debugger/pdb/pdbengine.cpp5
2 files changed, 7 insertions, 12 deletions
diff --git a/share/qtcreator/debugger/pdbbridge.py b/share/qtcreator/debugger/pdbbridge.py
index 07bdbf660c..cae2d3c19c 100644
--- a/share/qtcreator/debugger/pdbbridge.py
+++ b/share/qtcreator/debugger/pdbbridge.py
@@ -5,7 +5,8 @@ import linecache
import inspect
import os
-class Dumper:
+def qdebug(cmd, args):
+ class Dumper:
def __init__(self):
pass
@@ -273,12 +274,7 @@ class Dumper:
sys.stdout.write("@\n" + stuff + "@\n")
sys.stdout.flush()
-def qdebug(options = None,
- expanded = None,
- typeformats = None,
- individualformats = None,
- watchers = None):
- sys.stdout.write("\n(Pdb)\n")
- sys.stdout.flush()
-theDumper = Dumper()
+ d = Dumper()
+ method = getattr(d, cmd)
+ method(args)
diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp
index 5ac68dbb71..021708f479 100644
--- a/src/plugins/debugger/pdb/pdbengine.cpp
+++ b/src/plugins/debugger/pdb/pdbengine.cpp
@@ -135,7 +135,7 @@ void PdbEngine::postCommand(const QByteArray &command, DebuggerCommand::Callback
void PdbEngine::runCommand(const DebuggerCommand &cmd)
{
QTC_ASSERT(m_pdbProc.state() == QProcess::Running, notifyEngineIll());
- QByteArray command = "theDumper." + cmd.function + "({" + cmd.args + "})";
+ QByteArray command = "qdebug('" + cmd.function + "',{" + cmd.args + "})";
showMessage(_(command), LogInput);
m_pdbProc.write(command + '\n');
}
@@ -734,8 +734,7 @@ void PdbEngine::handleUpdateAll(const DebuggerResponse &response)
void PdbEngine::updateAll()
{
- postCommand("dir()");
- postCommand("theDumper.stackListFrames({})");
+ postCommand("qdebug('stackListFrames',{})");
updateLocals();
}