From: Luciano Miguel Ferreira Rocha <luciano@lsd.di.uminho.pt>
To: "Singh, Umesh K (MED)" <Umesh.Singh@geind.ge.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: stack trace
Date: Thu, 21 Aug 2003 11:57:08 +0100 [thread overview]
Message-ID: <20030821105708.GA8141@lsd.di.uminho.pt> (raw)
In-Reply-To: <DD9E117A8BE9F34FA4130376EC9C1F6A05E5136D@BANMLVEM01.e2k.ad.ge.com>
On Thu, Aug 21, 2003 at 09:29:56AM +0530, Singh, Umesh K (MED) wrote:
> is it possible to get the stack trace without attaching the process to debugger. For Ex. can i write a func let's say "print_stack_trace()" and call it anywhere in my program to print the stack trace at that point of time.
>
> i thot it will be helpful in my big programs.
>
> if it is possible, any direction/pointers???
Other people pointed to backtrace(), but I normally use in my programs,
for debugging purposes, assert(3) or abort(2) directly. The program is
also then terminated.
Thus I get a core file with the state of the program at that time. (Don't
forget to check the ulimit for core file size.)
Regards,
Luciano Rocha
next prev parent reply other threads:[~2003-08-21 10:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-21 3:59 stack trace Singh, Umesh K (MED)
2003-08-21 5:07 ` Glynn Clements
2003-08-21 6:12 ` Fekete Gabor
2003-08-21 7:57 ` (F)stack trace Steven
2003-08-21 10:57 ` Luciano Miguel Ferreira Rocha [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-08-22 3:54 stack trace Singh, Umesh K (MED)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030821105708.GA8141@lsd.di.uminho.pt \
--to=luciano@lsd.di.uminho.pt \
--cc=Umesh.Singh@geind.ge.com \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).