GDB Printers Use string instead of char array

Da Viper yerimyah1 at gmail.com
Wed Jul 28 14:48:09 BST 2021


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

thanks


More information about the Kde-finance-apps mailing list