Problems with gdb pretty-printers

Niko Sams niko.sams at gmail.com
Thu May 13 18:53:49 UTC 2010


On Thu, May 13, 2010 at 20:20, Victor Vicente de Carvalho
<victor.v.carvalho at gmail.com> wrote:
>
> 2010/5/13 Niko Sams <niko.sams at gmail.com>
>>
>> > Printing an Any on gdb witch contains strings returns a nicely formated
>> > output. On KDevelop, it's show as it wasn't recognized.
>> Is the pretty printer loaded correctly?
>> is the to_string method called at all? (You can test using print
>> statements in python
>> and watching kdevelop console output.
>>
> Yes, as I have other printers on the same module and they work fine, and for
> this printer basic structures like ints and booleans are converted right.
> Also on gdb terminal the same module prints the correct output. I'm making
> the import from my ~/.gdbinit.
>
To tackle this issue it would be most helpful to get a simplified test
case that consists of:
- you debugee (including your custom class) - simplified to only necessary code
- the pretty printer (simplified as well)
- kdevelop console output when debugging

out of that a simplified debug session using gdb cli and MI commands
can be created
that should show the same symptom (the relevant MI commands can be
found in the kdevelop
console output).

And then we will see if it's a gdb issue or a kdevelop issue...

Niko




More information about the KDevelop-devel mailing list