This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb whatis command


Hi,

I apologize if this has been asked about before.  I am new to this list.

I am attempting to improve this script:

http://websvn.kde.org/trunk/KDE/kdesdk/scripts/kde-devel-gdb?revision=629367&view=markup

It provides some nice user defined commands for GDB to display QT types
in a useful way.

One of the scripts limitations is that one has to specify the type(s) of
the object that you are trying to inspect.  For example:

printqmap myMap QString int

You will notice that there are comments in the script file about the
possibility that the gdb whatis command may be used to make this
automatic.

As far as I can tell it is not possible to use whatis in an expression
in the gdb scripting language.  For example something like this:

set $type = whatis myMap

Is there a way to do this?  If not how difficult whould it be to add
this ability to GDB?

Ultimately I would also need to do some string manipulation to extract
the types from the output of whatis.  Is this possible in the gdb
scripting langauge?

Regards

Abri Zaaiman


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]