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

M

mlimber

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-lite/how-to-post.html#faq-5.9

Cheers! --M
 
V

Victor Bazarov

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
 
R

red floyd

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
 
B

Branimir Maksimovic

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,016
Latest member
TatianaCha

Latest Threads

Top