QtCreator for LibreOffice : debugger integration
Michel Renon
michel.renon at free.fr
Wed Oct 7 04:12:58 PDT 2015
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
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.
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.
Cheers,
Michel
[1] An example with OUString for QtCreator :
---------------------------------------------------------------
def __get_rtl_ustring(d, pdata):
"""
"""
charSize = 2
array = pdata["buffer"]
length = pdata["length"]
cutoff = min(length*charSize, d.stringCutOff)
mem = d.readMemory(array, cutoff)
encodingType = Hex4EncodedLittleEndian
return mem, encodingType
def qdump__rtl__OUString(d, value):
"""
class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI OUString
{
public:
/// @cond INTERNAL
rtl_uString * pData;
/// @endcond
"""
pdata = value["pData"]
# show rtl_uString
mem, encodingType = __get_rtl_ustring(d, pdata)
d.putValue(mem, encodingType)
d.putAddress(value.address)
More information about the LibreOffice
mailing list