2015-06-24

‎Dumping Strings (etc): document auto-load-safe-path

← Older revision

Revision as of 2015-06-24T12:10:08

Line 93:

Line 93:

Through the magic of [http://lists.freedesktop.org/archives/libreoffice/2011-August/017088.html gdb pretty printers] then with gdb 7 onwards ''print string'' will dump the contents of the string regardless of whether it's a UTF-16 rtl::OUString or 8-bit rtl::OString. There is pretty-printer support for sane dumping of a variety of other objects as well as strings, e.g. Any, Sequence, Date, Time, etc. Use ''print/r'' (or ''p/r'') if you really need to see the structure non-pretty-printed. The pretty printers are activated automatically for in-build debugging and for running from instdir.

Through the magic of [http://lists.freedesktop.org/archives/libreoffice/2011-August/017088.html gdb pretty printers] then with gdb 7 onwards ''print string'' will dump the contents of the string regardless of whether it's a UTF-16 rtl::OUString or 8-bit rtl::OString. There is pretty-printer support for sane dumping of a variety of other objects as well as strings, e.g. Any, Sequence, Date, Time, etc. Use ''print/r'' (or ''p/r'') if you really need to see the structure non-pretty-printed. The pretty printers are activated automatically for in-build debugging and for running from instdir.

+

+

Note: if pretty printers do not work out of the box, probably a gdb security setting prevents them from being loaded; look for an error message about "safe-path".  To avoid that problem, append this to the configuration file <code>$HOME/.gdbinit</code>:

+

+

add-auto-load-safe-path /path/to/your/lo/git

+

+

Note: Apple gdb is antique and does not support Python pretty-printers.

==== Dumping STL containers ====

==== Dumping STL containers ====

Show more