linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* stack trace
@ 2003-08-21  3:59 Singh, Umesh K (MED)
  2003-08-21  5:07 ` Glynn Clements
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Singh, Umesh K (MED) @ 2003-08-21  3:59 UTC (permalink / raw)
  To: linux-c-programming

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???

thanks,
-umesh

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: stack trace
@ 2003-08-22  3:54 Singh, Umesh K (MED)
  0 siblings, 0 replies; 6+ messages in thread
From: Singh, Umesh K (MED) @ 2003-08-22  3:54 UTC (permalink / raw)
  To: linux-c-programming

thanks all of you, i think i got fair amount of homework. will try all
the suggestions and come back to you guys very soon if i have some
doubt. what i was looking is the trace equivalent to gdb or dbx output.
yeah, i am compiling with debug info and without optimization. i think
assert(3) or abort(2) is also a nice idea which will be useful in lot of
cases but in my case i won't prefer to terminate my program in most of
the cases.

thanks,
-umesh

-----Original Message-----
From: Fekete Gabor [mailto:feketga@delfin.unideb.hu]
Sent: Thursday, August 21, 2003 11:42 AM
To: linux-c-programming
Subject: Re: stack trace




On Thu, 21 Aug 2003, 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.

read this:
http://www.linuxjournal.com/article.php?sid=6391
it might help.

-
To unsubscribe from this list: send the line "unsubscribe
linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-08-22  3:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` stack trace Luciano Miguel Ferreira Rocha
  -- strict thread matches above, loose matches on Subject: below --
2003-08-22  3:54 Singh, Umesh K (MED)

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).