Cool.. :-) Great.. Thanks a lot Dave. 
My task has become too much easier now :-)


Thanks again,
Vivek

On Tue, Feb 19, 2013 at 9:05 PM, Dave Anderson <anderson@redhat.com> wrote:


----- Original Message -----
> Hi Dave,
>
>
> Thank you so much for responding to the query.
>
>
> If its printing backtrace then calling back_trace() would suffice.
> But I have few global structures that can be printed in crash by
> just their name.
> e.g. struct xyz object; Where its member is "int i"
> Above declaration is global so in crash I can simply dump its
> contents as below (provided object symbols are loaded in crash)
> crash> object <ENTER>
> object = {
> i = 0;
> }
>
> So I want to achieve same thing via crash extension as I have too
> many structures that I want to dump.
> Any suggestions how it can be achieved ?

Get the address of "object" xyz structure with:

  address = symbol_value("object");

and then either dump the complete structure with:

  dump_struct("xyx", address, RADIX(16));

or just the "i" member with:

  dump_struct_member("xyz.i", address, RADIX(16));

You can use RADIX(10) to dump non-pointer values in decimal, or pass 0
in the 3rd argument to utilize whatever the current hex/dec radix output
format is set.

Dave