This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Type identification within a user defined commands
- From: Daniel Jacobowitz <drow at false dot org>
- To: Brendan Doherty <brendand at gentrack dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 20 Oct 2004 18:22:07 -0400
- Subject: Re: Type identification within a user defined commands
- References: <7D8E31C9DCC5204AB4AA23315B352F5B2F0DE6@exchange.talgentra.co.nz>
On Thu, Oct 21, 2004 at 10:35:56AM +1300, Brendan Doherty wrote:
> Is it possible to identify the type of a variable passed to a user
> defined command.
>
> I'm trying to create a prettier print that displays information about
> the various classes that we use.
> I want to use the type to access attributes specific to that class.
>
> What I am trying to do is considerable more complex than the example
> below, bug it demostrates what I want to do.
No, it isn't possible. You'd need a real scripting language for this;
a Perl implementation was posted, and someone has said they're working
on a Guile implementation.
--
Daniel Jacobowitz