diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-02-06 10:29:06 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-02-06 10:42:37 +0000 |
commit | 8d7b548d9ea0e0b2579e2901ed2ab2cfa59b693d (patch) | |
tree | 1b4b2ace63238a24709afd06c39aa9791f4c3d65 /doc | |
parent | 3f757998b5aafccfe2793f1838e833cc56ff22a9 (diff) |
Doc: Add info on getting to object base instance in debugging helper
Task-number: QTCREATORBUG-19597
Change-Id: Ie02b51c771faf70a1210abb5e1abe6120706c031
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/debugger/creator-debugger.qdoc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc index fa50073ef3..e6ba8f2eb9 100644 --- a/doc/src/debugger/creator-debugger.qdoc +++ b/doc/src/debugger/creator-debugger.qdoc @@ -1100,6 +1100,16 @@ avoid direct access to the \c gdb.* and \c lldb.* namespaces and use the functions of the \c Dumper class instead. + To get to the base instance of the object in the debugging helper, use the + \c value.base() function or the following example code: + + \code + def qdump__A(d, value): + t = value.members(True)[0].type + dptr, base_v = value.split('p{%s}' % t.name) + d.putItem(base_v) + \endcode + Debugging helpers can be set up to be called whenever a type name matches a regular expression. To do so, the debugging helper's function name must begin with \c{qdump__} (with two underscore characters). In addition, |