forked from qt-creator/qt-creator
Debugger: Add a README to help with dumper command line use
Not exactly the intended use, and whence not part of the docs. Change-Id: I622c3aef637700c895e37f79cc6ffac7b2cd5205 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
68
share/qtcreator/debugger/README.txt
Normal file
68
share/qtcreator/debugger/README.txt
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
While the primary intention of this pretty printing implementation is
|
||||||
|
to provide what Qt Creator needs, it can be used in a plain commandline
|
||||||
|
GDB session, too.
|
||||||
|
|
||||||
|
With
|
||||||
|
|
||||||
|
python sys.path.insert(1, '<path/to/qtcreator>/share/qtcreator/debugger/')
|
||||||
|
python from gdbbridge import *
|
||||||
|
|
||||||
|
in .gdbinit there is a new "GDB command", called "pp".
|
||||||
|
|
||||||
|
With code like
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QString ss = "Hello";
|
||||||
|
QApplication app(argc, argv);
|
||||||
|
app.setObjectName(ss);
|
||||||
|
// break here
|
||||||
|
}
|
||||||
|
|
||||||
|
the "pp" command can be used as follows:
|
||||||
|
|
||||||
|
(gdb) pp app
|
||||||
|
app =
|
||||||
|
[
|
||||||
|
<QGuiApplication> = {"Hello"}
|
||||||
|
staticMetaObject = <QMetaObject> = {""}
|
||||||
|
[parent] = <QObject *> = {"0x0"}
|
||||||
|
[children] = <QObjectList> = {"<3 items>"}
|
||||||
|
[properties] = "<>0 items>"
|
||||||
|
[methods] = "<6 items>"
|
||||||
|
[signals] = "<1 items>"
|
||||||
|
],<QApplication> = {"Hello"}
|
||||||
|
|
||||||
|
(gdb) pp app [properties],[children]
|
||||||
|
app =
|
||||||
|
[
|
||||||
|
<QGuiApplication> = {"Hello"}
|
||||||
|
staticMetaObject = <QMetaObject> = {""}
|
||||||
|
[parent] = <QObject *> = {"0x0"}
|
||||||
|
[children] = [
|
||||||
|
<QObject> = {""}
|
||||||
|
<QObject> = {""}
|
||||||
|
<QObject> = {"fusion"}
|
||||||
|
],<QObjectList> = {"<3 items>"}
|
||||||
|
[properties] = [
|
||||||
|
windowIcon = <QVariant (QIcon)> = {""}
|
||||||
|
cursorFlashTime = <QVariant (int)> = {"1000"}
|
||||||
|
doubleClickInterval = <QVariant (int)> = {"400"}
|
||||||
|
keyboardInputInterval = <QVariant (int)> = {"400"}
|
||||||
|
wheelScrollLines = <QVariant (int)> = {"3"}
|
||||||
|
globalStrut = <QVariant (QSize)> = {"(0, 0)"}
|
||||||
|
startDragTime = <QVariant (int)> = {"500"}
|
||||||
|
startDragDistance = <QVariant (int)> = {"10"}
|
||||||
|
styleSheet = <QVariant (QString)> = {""}
|
||||||
|
autoSipEnabled = <QVariant (bool)> = {"true"}
|
||||||
|
],"<10 items>"
|
||||||
|
[methods] = "<6 items>"
|
||||||
|
[signals] = "<1 items>"
|
||||||
|
],<QApplication> = {"Hello"}
|
||||||
|
|
||||||
|
(gdb) pp ss
|
||||||
|
ss =
|
||||||
|
<QString> = {"Hello"}
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user