From dbab3dc2e95cc517ed700e3667c4c1eef932ebe6 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 12 Sep 2014 17:07:05 +0200 Subject: [PATCH] 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 Reviewed-by: Leena Miettinen Reviewed-by: hjk --- share/qtcreator/debugger/README.txt | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 share/qtcreator/debugger/README.txt diff --git a/share/qtcreator/debugger/README.txt b/share/qtcreator/debugger/README.txt new file mode 100644 index 00000000000..9e67134c1d0 --- /dev/null +++ b/share/qtcreator/debugger/README.txt @@ -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, '/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 = + [ + = {"Hello"} + staticMetaObject = = {""} + [parent] = = {"0x0"} + [children] = = {"<3 items>"} + [properties] = "<>0 items>" + [methods] = "<6 items>" + [signals] = "<1 items>" + ], = {"Hello"} + + (gdb) pp app [properties],[children] + app = + [ + = {"Hello"} + staticMetaObject = = {""} + [parent] = = {"0x0"} + [children] = [ + = {""} + = {""} + = {"fusion"} + ], = {"<3 items>"} + [properties] = [ + windowIcon = = {""} + cursorFlashTime = = {"1000"} + doubleClickInterval = = {"400"} + keyboardInputInterval = = {"400"} + wheelScrollLines = = {"3"} + globalStrut = = {"(0, 0)"} + startDragTime = = {"500"} + startDragDistance = = {"10"} + styleSheet = = {""} + autoSipEnabled = = {"true"} + ],"<10 items>" + [methods] = "<6 items>" + [signals] = "<1 items>" + ], = {"Hello"} + + (gdb) pp ss + ss = + = {"Hello"} + +