diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc index cec2fb0592e..fa065d2634c 100644 --- a/doc/src/debugger/creator-debugger.qdoc +++ b/doc/src/debugger/creator-debugger.qdoc @@ -880,15 +880,17 @@ is also easier to extend as the script is less dependent on the actual Qt version and does not need compilation. - To extend the shipped Python based debugging helpers for custom types, - define one Python function per user defined type in the - GDB startup file. By default, the following startup file is used: - \c{~/.gdbinit}. To use another file, select \gui {Tools > Options > - Debugger > GDB} - and specify a filename in the \gui {GDB startup script} field. + To extend the shipped Python based debugging helpers for custom + types, add debugging helper implementations to the GDB startup file + \c{~/.gdbinit}, or specify them directly in the \gui{Additional + Startup Commands} in \gui {Tools > Options > Debugger > GDB}. - The function name has to be qdump__NS__Foo, where NS::Foo is the class - or class template to be examined. Nested namespaces are possible. + The implementation of a debugging helper typically + 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 display an object of this type. The function is passed the following @@ -915,9 +917,6 @@ alloc = d_ptr["alloc"] size = d_ptr["size"] - check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000) - checkRef(d_ptr["ref"]) - innerType = templateArgument(value.type, 0) d.putItemCount(size) d.putNumChild(size) diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index aa0052ffe64..4aa5782eca7 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -229,7 +229,12 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent) "
GDB commands entered here will be executed after " "GDB has been started and the debugging helpers have been initialized.
" "You can add commands to load further debugging helpers here, or " - "modify existing ones.
To execute arbitrary Python scripts, " + "modify existing ones.
" + "To execute simple Python commands, prefix them with \"python\".
" + "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.
" + "To execute arbitrary Python scripts, " "use python execfile('/path/to/script.py').
" ""));