[Qt-creator] gdb Debugg Helpers - typedef bug

André Pönitz andre.poenitz at nokia.com
Mon Jul 20 13:25:56 CEST 2009


On Monday 20 July 2009 12:42:51 ext Nico Kruber wrote:
> > That's closer to a missing feature than to a bug, at least not in Creator.
> >
> > The type reported by gdb is 'List'. I could resolve this to 'QList<int>'
> > 'manually', However, doing so would generally impact the debugging
> > helper performance as this would need an additional roundtrip for
> > each item in the Locals&Watchers view (and an roundtrip takes
> > several dozen milliseconds even on fast machines, so we are talking
> > about slowing down each 'step' by a second or so.)
> >
> > You can get a 'nice' display of list2 'manually' by creating a 'Watcher'
> > with expression   *('QList<int>'*)&list2  .
> 
> Couldn't you add the "QList<int>" to the view as if it was a super-class of 
> List and only evaluate it further if the user expands that view with the 
> little "+" symbol?
> -> that way you won't slow down the process on default but allow for further 
> evaluation..

The problem is that there is no indication in the first response
packet whether 'Foo' is a 'real' type or is a typedef. 

I basically get a 

  ^done,locals=[{name="foo",type="Foo",value="{...}"}

without any hint about the 'true' type of Foo.


Now, if 'Foo' is a type known to the helpers I invoke

  call fancyFunction(&foo, "Foo", ....)

The alternative is to send another request 

  whatis Foo

and check whether it's output contains

  type = Foo    or   type = QList<int>

to decide whether to invoke a helper. And that's the
extra round-trip...

Andre'



More information about the Qt-creator-old mailing list