debugger: adjust reference to startup commands to reality

Change-Id: I4369de839eba8cd30d261b74e89f2363ca815926
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
hjk
2012-11-17 15:22:36 +01:00
parent efb3e91daa
commit 2e01daa2a0
2 changed files with 16 additions and 12 deletions

View File

@@ -880,15 +880,17 @@
is also easier to extend as the script is less dependent on the is also easier to extend as the script is less dependent on the
actual Qt version and does not need compilation. actual Qt version and does not need compilation.
To extend the shipped Python based debugging helpers for custom types, To extend the shipped Python based debugging helpers for custom
define one Python function per user defined type in the types, add debugging helper implementations to the GDB startup file
GDB startup file. By default, the following startup file is used: \c{~/.gdbinit}, or specify them directly in the \gui{Additional
\c{~/.gdbinit}. To use another file, select \gui {Tools > Options > Startup Commands} in \gui {Tools > Options > Debugger > GDB}.
Debugger > GDB}
and specify a filename in the \gui {GDB startup script} field.
The function name has to be qdump__NS__Foo, where NS::Foo is the class The implementation of a debugging helper typically
or class template to be examined. Nested namespaces are possible. consists of a single Python function, which needs to be named
\c{qdump__NS__Foo}, where \c{NS::Foo} is the class
or class template to be examined. Note that the \c{::} scope
resolution operator is replaced by double underscores \c{__}.
Nested namespaces are possible.
The debugger plugin calls this function whenever you want to The debugger plugin calls this function whenever you want to
display an object of this type. The function is passed the following display an object of this type. The function is passed the following
@@ -915,9 +917,6 @@
alloc = d_ptr["alloc"] alloc = d_ptr["alloc"]
size = d_ptr["size"] size = d_ptr["size"]
check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
checkRef(d_ptr["ref"])
innerType = templateArgument(value.type, 0) innerType = templateArgument(value.type, 0)
d.putItemCount(size) d.putItemCount(size)
d.putNumChild(size) d.putNumChild(size)

View File

@@ -229,7 +229,12 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent)
"<html><head/><body><p>GDB commands entered here will be executed after " "<html><head/><body><p>GDB commands entered here will be executed after "
"GDB has been started and the debugging helpers have been initialized.</p>" "GDB has been started and the debugging helpers have been initialized.</p>"
"<p>You can add commands to load further debugging helpers here, or " "<p>You can add commands to load further debugging helpers here, or "
"modify existing ones.</p><p>To execute arbitrary Python scripts, " "modify existing ones.</p>"
"<p>To execute simple Python commands, prefix them with \"python\".</p>"
"<p>To execute sequences of Python commands spanning multiple lines "
"prepend the block with \"python\" on a separate line, and append "
"\"end\" on a separate line.</p>"
"<p>To execute arbitrary Python scripts, "
"use <i>python execfile('/path/to/script.py')</i>.</p>" "use <i>python execfile('/path/to/script.py')</i>.</p>"
"</body></html>")); "</body></html>"));