QtCreator for LibreOffice : debugger integration
Michael Stahl
mstahl at redhat.com
Wed Oct 7 05:22:48 PDT 2015
On 07.10.2015 13:12, Michel Renon wrote:
> Hi Michael,
>
> Le 15/06/2015 15:30, Michael Stahl a écrit :
>> On 15.06.2015 15:21, Michel Renon wrote:
>>> Hi,
>>>
>>> Here is the next step of QtCreator integration : debugging of OUString
>>> (and internal type rtl_uString)
>>>
>>> http://imgur.com/ZrvIZ2V,2G52CwW,2r2wVSP
>>>
>>> 1 : default view for OUString variable : just address and length
>>> 2 : new view : you have the string (here with some specific french
>>> characters and 'euro' symbol)
>>> 3 : new view : you can have internals of OUString
>>
>> i don't quite understand - why not just display the content of the
>> string by default using the python pretty printers in solenv/gdb, like
>> Eclipse CDT and KDevelop do?
>
> Because QtCreator has its own api...
> http://doc.qt.io/qtcreator/creator-debugging-helpers.html
... but evidently the gdb ones do work, for me, on Fedora 22:
qt-creator-3.5.0-1.fc22.x86_64
if i attach to soffice.bin and hover over an OUString variable the
pop-up displays the content of the string properly; also the "variable"
view on the right side of the window.
iirc this didn't work out-of-the-box, i had to go to
Tools->Options->Debugger->GDB and change something there, probably the
"Load system GDB pretty printers" setting.
> It seems that there cannot be common/shared code between existing gdb helpers and qtcreator's one [1].
>
> So can i create a folder : solenv/gdb/qtcreator that will contain specific qtcreator gdb helpers ?
> I started with strings, and will continue with other basic LO types.
well i still don't understand why the existing things don't work for you...
the documentation you refer to claims that these Qt specific python
helpers work with both gdb and lldb, so perhaps you could use them on
MacOS X where there is no well working gdb?
> Currently, I need to manually enter the path to those helpers in a QtCreator dialog.
> (qtcreator just execute in gdb "source path/to/helper.py")
> Is there a way to predefine that command in gdb to avoid any manual configuration ?
> If possible, I plan to execute it at the end of "make qtcreator-ide-integration" command.
gdb can auto-load python files with a particular naming pattern like
"libuno_sal.so.3-gdb.py" but we already use that for the gdb
pretty-printers.
More information about the LibreOffice
mailing list