|
From: | POKHARAKAR Sandeep |
Subject: | [Libunwind-devel] retrieve Stack Trace of all threads from Current process |
Date: | Fri, 30 Apr 2010 18:47:55 +0900 |
Hello all, I am currently able to install libunwind on my Linux x86_64
and use this. I have installed libunwind by following the steps mentioned in
the installation doc and it is successful. I also, I could retrieve the Current call stack of the
Current thread by using “unw_init_remote” method. But also I want
to access other threads of my current Process and see their call stack and I am
stuck at this point. In my application, using JVMTI APIs I can handle events when
a native binding occurs to get the OS thread Ids that are bound. I would like
to get information of all these native threads i.e using the thread Ids, I
would like to walk the their stack. But there seems to be no direct approach
for this. The steps I followed to achieve this are: unw_getcontext => unw_create_addr_space => passed unw_accessors_t. _UPT_create => passed process id
and thread ids. unw_init_remote => passed above
return value. unw_step => to walk the stack
frames but method unw_step fails i.e. return value greater than 0 and
does not return the expected result for me. Could you please tell me what all
could be the reasons of failure of this. Also I am quite confused about the usage of callback methods
assigned to unw_accessors_t, how these callback methods can be implemented or
used to achieve my objective. Is there any workaround to _UPT_create? How can we use it
for multiple threads? Is there any sample which I can refer? Please help me
on this topic. With Regards, Sandeep POKHARAKAR This e-mail communication and any attachments are privileged and
confidential and intended only for the use of the recipients named above. If
you are not the intended recipient, please do not review, disclose,
disseminate, distribute or copy this e-mail and attachments. If you have
received this communication in error, please notify the sender immediately by
email or telephone. |
[Prev in Thread] | Current Thread | [Next in Thread] |