469,270 Members | 1,864 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

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

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

Oct 20 '05 #1
4 1451
kevin.h...@motioneng.com 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

Oct 20 '05 #2
ke********@motioneng.com 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
Oct 20 '05 #3
ke********@motioneng.com 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
Oct 20 '05 #4

ke********@motioneng.com 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.

Oct 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.