Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Is there a way with Linux x86 to report a way the current stack trace for a thread?

Reply
Thread Tools

Is there a way with Linux x86 to report a way the current stack trace for a thread?

 
 
kevin.hall@motioneng.com
Guest
Posts: n/a
 
      10-20-2005
Is there a way with Linux x86 to report a way the current stack trace
for a thread during runtime without a debugger? (I couldn't find
anything searching Google.)

For Windows this is possible. Here's an example of an application that
uses Window's stack tracing abilities:

http://www.codeproject.com/tools/visualleakdetector.asp

Many thanks!

- Kevin

 
Reply With Quote
 
 
 
 
mlimber
Guest
Posts: n/a
 
      10-20-2005
(E-Mail Removed) wrote:
> Is there a way with Linux x86 to report a way the current stack trace
> for a thread during runtime without a debugger? (I couldn't find
> anything searching Google.)
>
> For Windows this is possible. Here's an example of an application that
> uses Window's stack tracing abilities:
>
> http://www.codeproject.com/tools/visualleakdetector.asp
>
> Many thanks!
>
> - Kevin


This is off topic in this newsgroup, which is concerned with standard
C++ language issues. Try in a Linux programming forum. See this FAQ for
some specific suggestions:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      10-20-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Is there a way with Linux x86 to [...]


You seem lost. You need 'comp.os.linux.development.*' hierarchy.
'comp.lang.c++' is about C++ _language_. When you have a C++ language
question, please come back and ask it.

V
 
Reply With Quote
 
red floyd
Guest
Posts: n/a
 
      10-20-2005
(E-Mail Removed) wrote:
> Is there a way with Linux x86 to report a way the current stack trace
> for a thread during runtime without a debugger? (I couldn't find
> anything searching Google.)
>
> For Windows this is possible. Here's an example of an application that
> uses Window's stack tracing abilities:
>
> http://www.codeproject.com/tools/visualleakdetector.asp
>
> Many thanks!
>
> - Kevin
>


I was able to write one in SCO ODT 2. Look at ptrace(2) or whatever the
equivalent in Linux is.

However, as mlimber pointed out, this is OT. Try gnu.g++.help
 
Reply With Quote
 
Branimir Maksimovic
Guest
Posts: n/a
 
      10-20-2005

(E-Mail Removed) wrote:
> Is there a way with Linux x86 to report a way the current stack trace
> for a thread during runtime without a debugger? (I couldn't find
> anything searching Google.)


You should ask in linux newsgroup then.
For a gcc there is void* __builtin_return_address(unsigned level);
and void* __builtin_frame_address(unsigned level);
with level 0 returning current function and frame address respectively.

Greetings, Bane.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C/C++ compilers have one stack for local variables and return addresses and then another stack for array allocations on the stack. Casey Hawthorne C Programming 3 11-01-2009 08:23 PM
NetBeans debugger: suspend and see current stack trace how? Nelson Ashton Java 15 10-15-2008 01:22 AM
is there any way to print a stack trace in ASP classic ? wbsurfver@yahoo.com ASP General 1 10-04-2007 03:01 PM
Why is there an x86 emu if a processor is x86-64? =?Utf-8?B?RWxsaW90IEh1ZGdpbnM=?= Windows 64bit 4 07-23-2006 11:52 PM
x86 Mac Laptop and x86 iMac now available Daniel NZ Computing 11 01-17-2006 12:11 PM



Advertisments