PDA

View Full Version : How can I view a QT string as a string?



Josh-TotalView-Tech
05-11-2007, 09:11 AM
You can view QT's string class as a string by using TotalView's Type Transformation Facility (TTF). If your application is linked against a debug copy of QT and you add the following text to your $HOME/.tvdrc file:



::TV::TTF::RTF::build_struct_transform {
name {^struct QString$}
members {
{ ascii { $wstring_u16 cast { * { d -> unicode } } } }
}
}

::TV::TTF::RTF::build_struct_transform {
name {^struct QString$}
members {
{ ascii { $wstring_u16 cast {* {d -> data} } } }
}
}


and restart TotalView whenever you dive on a variable of type QT string it will show you the string instead of the compilers implementation of the string class. The first TTF is for QT version 3. The later is for QT version 4. If you would like to make this available to all users of a TotalView installation, create or edit the file $TVROOT/<arch>/.tvdrc where $TVROOT is the base of your TotalView installation and "<arch>" is the architecture your using, and add the transformation.

huzefar
12-07-2007, 04:15 AM
Many Thanks !

that helps a lot !!

Regards
Huzy