There's not an API for that which I am aware of.
The only thing I can see is something along the lines of printf...
dump_structure("foo ics", foo_instance);
It could parse that string and know that the name is foo, the first element
in the structure is an integer, second is a character, and third is a
string, and print them out accordingly.
But I think what you're trying to do is really better served by GDB.
--Palrich.
----- Original Message -----
From: "Joseph H Dale" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, November 16, 2003 6:31 PM
Subject: advanced help
> Is there an API that lets you read a variable type and value..here is what
i
> was thinking.
>
> A routine to let you read and dump values from structures like so.
>
> struct foo
> {
> int a;
> char b;
> char *c;
> }
>
> dumping this would display
> structure foo values area
> value 1 (int) = 501
> value 2 (char) = 'D'
> value 3 (*char) = 'This is a sting'
>
> I am tring to find a way to assist myself and eventually others in
debugging
> memory more easily. So when you have a memory leak it might become more
> obvious what is leaking.
>
> thanks in advance
> Joe
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom