[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Libunwind-devel] remote unwinding and process detach?
From: |
POKHARAKAR Sandeep |
Subject: |
RE: [Libunwind-devel] remote unwinding and process detach? |
Date: |
Wed, 12 May 2010 18:06:54 +0900 |
This is really helpful..
Backtrace of current thread perfectly works at me also.
My requirement is same as you, except I want to unwind stack of 2nd thread of
my current process from 1st thread. Here i do not need to do ptrace and attach
as I am in the same process. Even if I do, it fails.
I am also following the same steps as you mentioned, but my unw_init_remote
method fails saying registers of my 2nd thread are not accessible from 1st
thread.
I think here I am facing issue of something like thread context. I need to
somehow get context of the 2nd thread / suspend 2nd thread, read callstack and
resume again 2nd thread. I am not sure of these and even I am wondering how to
do this from my 1st thread.
Any ways.. thanks a lot for your responses.
Let's see if someone could help in this.
Thanks,
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.
-----Original Message-----
From: Rao Loka [mailto:address@hidden
Sent: Tuesday, May 11, 2010 10:11 PM
To: POKHARAKAR Sandeep
Subject: RE: [Libunwind-devel] remote unwinding and process detach?
I was using libunwind-0.99 version and tried with AMD64 linux running 64-bit
linux.
My goal was to get stack trace at my "points of interest."
There are several tests in the test directory that show how to get the
backtrace.
The functions I used in particular are:
1. unw_create_addr_space
2. _UPT_create
3. unw_init_remote
4. unw_get_proc_name
5. unw_step
And I used ptrace to attach and detach to the process.
The problem I had was that attach (or init_remote) fails and I hadn't found a
way
to detach the process. So the "attached" process is left hanging ...
- Thanks,
- Rao.
________________________________________
From: POKHARAKAR Sandeep address@hidden
Sent: Monday, May 10, 2010 9:44 PM
To: Rao Loka
Subject: RE: [Libunwind-devel] remote unwinding and process detach?
Thanks for your response Rao.
It's ok that you used it for a process. this will surely help me.
Could you please give me the information relevant to the steps you followed and
which version of libunwind you used.
I am trying to use this on Linux. Probably your information may help me.
Thanks,
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.
-----Original Message-----
From: Rao Loka [mailto:address@hidden
Sent: Monday, May 10, 2010 9:47 PM
To: POKHARAKAR Sandeep
Subject: RE: [Libunwind-devel] remote unwinding and process detach?
Sorry, I wasn't trying to attach to threads. I was just trying to attach to a
process.
I hadn't tried to follow individual threads ...
- Thanks,
- Rao.
________________________________________
From: POKHARAKAR Sandeep address@hidden
Sent: Monday, May 10, 2010 3:39 AM
To: address@hidden
Subject: [Libunwind-devel] remote unwinding and process detach?
Hi Raghavendra,
With ref to http://www.mail-archive.com/address@hidden/msg00484.html thread, I
need your help from you if possible.
As I am trying to achieve same thing as you did, could specify what all steps
you followed to get this working and which version of libunwind you used for
the same.
how does it handles multiple threads executing in the Same process to retrieve
call stack.
Could you please provide this information to me.
Thanks in advance.
With Regards,
Sandeep POKHARAKAR
- RE: [Libunwind-devel] remote unwinding and process detach?,
POKHARAKAR Sandeep <=