Debugger: Add specific customization hook for dumper initialization

We need to distiguish between start of GDB itself (a.k.a .gdbinit-style
customization) and after the dumper machinery is initialized, which is
nowadays often delayed until the first stop hook.

Change-Id: I40f1e7225c2043b8bcb7d50eef948bb3c9162bb6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-06-03 14:27:53 +02:00
parent c140442132
commit 76fc972277
5 changed files with 45 additions and 9 deletions

View File

@@ -1854,6 +1854,12 @@ void GdbEngine::handleHasPython(const GdbResponse &response)
void GdbEngine::handlePythonSetup(const GdbResponse &response)
{
if (response.resultClass == GdbResultDone) {
const QString commands = debuggerCore()->stringSetting(GdbCustomDumperCommands);
if (!commands.isEmpty()) {
postCommand(commands.toLocal8Bit());
postCommand("bbsetup");
}
postCommand("python qqStringCutOff = "
+ debuggerCore()->action(MaximalStringLength)->value().toByteArray(),
ConsoleCommand|NonCriticalResponse);
@@ -4972,6 +4978,7 @@ void GdbEngine::tryLoadPythonDumpers()
postCommand("python execfile('" + dumperSourcePath + "gbridge.py')",
ConsoleCommand, CB(handlePythonSetup));
}
void GdbEngine::reloadDebuggingHelpers()