Debugger: Disable GDB's own pretty printers when use is not wanted

Saves up to 20% on large uniform structures.

Change-Id: I98c8c942f0accac7e2db1d8b06bf7ed156967306
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-01-25 01:36:08 +01:00
parent e2f12fa02b
commit 4c928f6099
2 changed files with 7 additions and 2 deletions

View File

@@ -184,6 +184,9 @@ class PlainDumper:
d.putSubItem(child[0], child[1]) d.putSubItem(child[0], child[1])
def importPlainDumpers(args): def importPlainDumpers(args):
if args == "off":
gdb.execute("disable pretty-printer .* .*")
else:
theDumper.importPlainDumpers() theDumper.importPlainDumpers()
registerCommand("importPlainDumpers", importPlainDumpers) registerCommand("importPlainDumpers", importPlainDumpers)

View File

@@ -1534,7 +1534,9 @@ void GdbEngine::handleStop1(const GdbMi &data)
if (!m_systemDumpersLoaded) { if (!m_systemDumpersLoaded) {
m_systemDumpersLoaded = true; m_systemDumpersLoaded = true;
if (m_gdbVersion >= 70400 && boolSetting(LoadGdbDumpers)) if (m_gdbVersion >= 70400 && boolSetting(LoadGdbDumpers))
postCommand("importPlainDumpers"); postCommand("importPlainDumpers on");
else
postCommand("importPlainDumpers off");
} }
handleStop2(data); handleStop2(data);