Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb whatis command
@ 2007-08-07  6:30 Abri Zaaiman
  2007-08-07 11:32 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Abri Zaaiman @ 2007-08-07  6:30 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb whatis command
  2007-08-07  6:30 gdb whatis command Abri Zaaiman
@ 2007-08-07 11:32 ` Daniel Jacobowitz
  2007-08-07 11:45   ` Abri Zaaiman
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-08-07 11:32 UTC (permalink / raw)
  To: Abri Zaaiman; +Cc: gdb

On Tue, Aug 07, 2007 at 08:30:37AM +0200, Abri Zaaiman wrote:
> 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?

No, it is not possible yet.

> 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?

Neither is this.

You might want to see the discussions we've had about adding Python
bindings to the scripting interface.  I hope we'll have something like
that for GDB 7.0, whenever that's ready.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb whatis command
  2007-08-07 11:32 ` Daniel Jacobowitz
@ 2007-08-07 11:45   ` Abri Zaaiman
  0 siblings, 0 replies; 3+ messages in thread
From: Abri Zaaiman @ 2007-08-07 11:45 UTC (permalink / raw)
  To: Daniel Jacobowitz, gdb

Thanks for your reply,

Thats exactly what I needed to know.  I will take a look at the
discussions.  I take it they were on this mailing list?

For me, I believe, it would be easier to make an eclipse plugin.
Eclipse seems to do quite a bit of parsing on gdb output so I know this
possible.

I am also working on something to load debugging info more
intelligently.  The debug symbols for my current project are about 1.8
GB and take quite a while to load.  I already have a way of stripping
debug symbols and placing them in seperate files.  All that is missing
is to make gdb load the symbols when they become needed.

Since this will probably have to be an eclipse plugin I might as well
combine the two.

Thanks again

Abri Zaaiman


On Tue, 2007-08-07 at 07:32 -0400, Daniel Jacobowitz wrote:
> On Tue, Aug 07, 2007 at 08:30:37AM +0200, Abri Zaaiman wrote:
> > 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?
> 
> No, it is not possible yet.
> 
> > 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?
> 
> Neither is this.
> 
> You might want to see the discussions we've had about adding Python
> bindings to the scripting interface.  I hope we'll have something like
> that for GDB 7.0, whenever that's ready.
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-07 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-07  6:30 gdb whatis command Abri Zaaiman
2007-08-07 11:32 ` Daniel Jacobowitz
2007-08-07 11:45   ` Abri Zaaiman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox