Hi Dave,<div><br></div><div>Thank you so much for responding to the query.</div><div><br></div><div>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.</div>

<div>e.g.  struct xyz  object;  Where its member is "int i"</div><div>Above declaration is global so in crash I can simply dump its contents as below (provided object symbols are loaded in crash)</div><div>crash>object   <ENTER></div>

<div>object = {</div><div>i = 0;</div><div>}</div><div><br></div><div><br></div><div>So I want to achieve same thing via crash extension as I have too many structures that I want to dump.</div><div>Any suggestions how it can be achieved ?</div>

<div><br></div><div><br></div><div>Thanks and Regards,</div><div>Vivek Satpute</div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 8:20 PM, Dave Anderson <span dir="ltr"><<a href="mailto:anderson@redhat.com" target="_blank">anderson@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
----- Original Message -----<br>
><br>
> Hi,<br>
><br>
> I have written crash extension(shared-object) for dumping few data structures from crash. I want to trigger<br>
> standard crash command e.g. "bt", from crash extension itself. Can anyone please help me<br>
> out, how can it be achieved ? I am using APIs exported by crash  header file defs.h<br>
><br>
> Your valuable suggestions would be helpful for me.<br>
><br>
><br>
> Thanks in advance.<br>
> Vivek Satpute<br>
<br>
</div></div>Calling a crash command from within another command is not supported.<br>
<br>
You *may* be able to get away with calling a "cmd_xxx()" function,<br>
depending upon how the global optind and optarg values, and<br>
the global argcnt and args[] array have been manipulated by your<br>
extension command.<br>
<br>
The better option is to call the worker functions that the cmd_xxx()<br>
functions utilize -- if that's possible.  In the case of "bt" you<br>
could call the exported back_trace() function, similar to the<br>
way that the "foreach" command does it in foreach() function.<br>
<br>
Dave<br>
<br>
--<br>
Crash-utility mailing list<br>
<a href="mailto:Crash-utility@redhat.com">Crash-utility@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/crash-utility" target="_blank">https://www.redhat.com/mailman/listinfo/crash-utility</a><br>
</blockquote></div><br></div>