LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Getting stack frame of a thread (https://www.linuxquestions.org/questions/linux-software-2/getting-stack-frame-of-a-thread-4175487823/)

salauddin.azam@gmail.com 12-13-2013 05:45 AM

Getting stack frame of a thread
 
Hi All,

I am new to this forum, my first question here is,

Is it possible to get a call stack of a thread when it is running, either by using proc utilities or by some standard library calls ?
(Note: No core dump, and dont want to dump a core)

linosaurusroot 12-17-2013 11:41 AM

You can attach a debugger while it's running.
Or "gcore" while the program runs and "gdb prog core" with "thread apply all bt".

salauddin.azam@gmail.com 12-17-2013 12:11 PM

Quote:

Originally Posted by linosaurusroot (Post 5082518)
You can attach a debugger while it's running.
Or "gcore" while the program runs and "gdb prog core" with "thread apply all bt".

Thanks for the reply, but my requirement is little different, i wanted to run a program which periodically takes the call stack of the specified thread ?

do you still think with "gcore" it is possible ?

Do you know any other way ?


All times are GMT -5. The time now is 09:43 PM.