Saturday, January 23, 2010

Gdb Qt pretty printers updated

I just commited an update to the Gdb Qt pretty printers, they work now for Qt 4.6. (I didn't test 4.5, but most won't work anymore I guess)

The printers need to poke around in private members, that's why they depend on a specific Qt version.

They are still located in the kdevelop git, instructions on how to enable them see here. (the svn url changed as kdevelop is now in extragear)

Unfortunately my merge request for Qt that would add them directly to Qt got rejected, so it is a bit difficult to support multiple Qt versions - for now 4.6 only is supported. Perhaps in future more people will discover this feature in Gdb and they will get added... You know where to find them.

6 comments:

  1. I really hope you keep pushing that it at some point gets pushed into main git.

    The problem here is (I've some experience with that) that the gdb devs really want the libraries to include these scripts by themselves, but nobody from gdb really advertizes that.
    I think you need to talk to the gdb guys and try to make sure that they are more proactive with this. As soon gdb says something like this officially:
    - We would like libraries to ship their own pretty printers
    - All printers installed in directory /x/y/z will be used automatically

    When that happens, there is more of an incentive to ship these scripts with the lib itself. It's the same with cmake. Cmake started to distribute modules for dozens of packages, but actually it would make most sense, if every package provides its own FindXXX.cmake script. This now starts to happen and it makes cmake again easier to use from a developer perspective.

    ReplyDelete
  2. I think that if Qt folks refuse this change, then getting GDB folks to adjust docs is rather roundabout approach, that is not likely to change anything. The fact that every library is supposed to install its own pretty printers is widely known and can be easily checked by dropping by in #gdb on freenode,
    if documentation at
    http://sourceware.org/gdb/current/onlinedocs/gdb/Auto_002dloading.html#Auto_002dloading
    seems unclear.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Are these pretty printers also available in kdevelop 4.2?

    ReplyDelete
  5. Hey,

    Did anyone ran this printers in CDT 8 (Eclipse)?

    When I use, it "disables" GDB, I can't step or view variables...

    Thanks.

    ReplyDelete