LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2013, 06:45 AM   #1
salauddin.azam@gmail.com
LQ Newbie
 
Registered: Dec 2013
Posts: 2

Rep: Reputation: Disabled
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)
 
Old 12-17-2013, 12:41 PM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

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

Last edited by linosaurusroot; 12-17-2013 at 12:42 PM.
 
Old 12-17-2013, 01:11 PM   #3
salauddin.azam@gmail.com
LQ Newbie
 
Registered: Dec 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by linosaurusroot View Post
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 ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] why this is happening in C ! ( related with stack frame ) tushar_pandey Programming 17 07-23-2012 01:23 AM
Thread overran stack, or stack corrupted rrlangly Linux - Kernel 1 12-21-2011 12:04 AM
Thread stack printing psmurthy Programming 5 08-18-2011 02:14 AM
thread's stack lqu Linux - Kernel 5 01-13-2010 12:57 AM
pthreads stack frame lock up detection flakjacket Linux - General 0 06-26-2004 12:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration