LinuxQuestions.org
Help answer threads with 0 replies.
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, 12:44 PM   #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, 03:41 PM   #2
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Ubuntu; PNE-LE; LFS (no book)
Posts: 594

Rep: Reputation: 102Reputation: 102
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, 06: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


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


All times are GMT -5. The time now is 09:35 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration