GDB Printers Use string instead of char array
Ralf Habacker
ralf.habacker at freenet.de
Thu Jul 29 11:11:21 BST 2021
Am 28.07.21 um 15:48 schrieb Da Viper via Kde-finance-apps:
> i am trying to return a string as one of the children in the pretty printer
>
> but is returns as a char array in kdevelop,
>
> [here](https://invent.kde.org/ebuka/gdb_printers/-/blob/master/printers/qtprinters.py#L312)
> i am trying to return a stringref in the printer, but it returns as a
> char array instead of a string,
>
> it works normally when it is in the `to string` method
> [see](https://invent.kde.org/ebuka/gdb_printers/-/blob/master/printers/qtprinters.py#L320)
>
> i tried to convert in to a gdb.Value to
> [here](https://invent.kde.org/ebuka/gdb_printers/-/blob/master/printers/qtprinters.py#L305)
> but it is still the same output,
>
> i look at the [api
> here](https://sourceware.org/gdb/onlinedocs/gdb/Values-From-Inferior.html)
> to convert it to a gdb value but it still the same output.
>
> i am not sure if i am doing it correctly
You have a QStringRef test case added to the repo for reproducing that
issue locally ?
Regards
Ralf
More information about the Kde-finance-apps
mailing list