LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-02-2007, 11:44 AM   #1
virtualCoder
Member
 
Registered: Sep 2007
Distribution: Ubuntu
Posts: 33

Rep: Reputation: 15
stack backtrace with pthreads


Hi all,

I was just wondering if there exist any issues of using stack backtraces ( int backtrace (void **buffer, int size) ) with multithreaded applications, specifically pthreads compared to using backtraces with single process/thread applications. I know the backtraces are for back-tracing the current thread, but just wondering if I should be aware of anything uncertain to happen if I use the two together or any tips .

The reason I'm asking this question is that its easier to debug applications when you know a problem wont occur because of some issue (namely backtrace with pthreads) and you can then narrow down where the problem can occur.

Thanks in advance!
 
Old 10-05-2007, 02:41 PM   #2
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 110Reputation: 110
under linux, each thread is given its own stack. so in theory, you should be fine. You might want to check out my new blog (http://monkey-coder.blogspot.com) where my first post shows an alternate backtracing function which should be portable. (tested on x86 and powerpc linux, and on cygwin).
 
Old 10-06-2007, 05:42 AM   #3
virtualCoder
Member
 
Registered: Sep 2007
Distribution: Ubuntu
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks orgcandman. Thats a nice blog you've got there.
 
  


Reply



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
Default stack size on Linux/glibc/pthreads? rameshnj Linux - Newbie 3 11-03-2009 02:55 AM
Difference b/t Kernel stack and User stack hazzyb Linux - Software 2 09-29-2008 07:40 PM
Getting stack backtrace for all instantiated threads bcreane Programming 2 05-02-2006 10:58 AM
Backtrace / stack dump for all Linux platforms GreyBeard Programming 7 07-21-2005 12:04 PM
pthreads stack frame lock up detection flakjacket Linux - General 0 06-26-2004 11:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:42 AM.

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
Open Source Consulting | Domain Registration