public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Get a whole call stack through the running of target program
@ 2005-10-27  2:52 ZengNan
  2005-10-27  5:28 ` Neo Jia
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ZengNan @ 2005-10-27  2:52 UTC (permalink / raw)
  To: gdb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312, Size: 326 bytes --]

Can gdb give the whole call stack from the beginning to the termination of the target program, so
I can see the flow of the algorithm.


	

	
		
___________________________________________________________ 
ÑÅ»¢Ãâ·ÑGÓÊÏ䣭ÖйúµÚÒ»¾øÎÞÀ¬»øÓʼþɧÈų¬´óÓÊÏä 
http://cn.mail.yahoo.com

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

* Re: Get a whole call stack through the running of target program
  2005-10-27  2:52 Get a whole call stack through the running of target program ZengNan
@ 2005-10-27  5:28 ` Neo Jia
  2005-10-27 12:44 ` Daniel Jacobowitz
  2005-10-28 18:53 ` Ramana Radhakrishnan
  2 siblings, 0 replies; 4+ messages in thread
From: Neo Jia @ 2005-10-27  5:28 UTC (permalink / raw)
  To: ZengNan; +Cc: gdb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB2312, Size: 709 bytes --]

hi,

What do you mean the "whole call stack"? So you are still interested in
the functions, those are already poped? If yes, I think you are actually
interested in the execution path of your program. GCC might help you.

Thanks,
Neo

ZengNan wrote:

>Can gdb give the whole call stack from the beginning to the termination of the target program, so
>I can see the flow of the algorithm.
>
>
>	
>
>	
>		
>___________________________________________________________ 
>ÑÅ»¢Ãâ·ÑGÓÊÏ䣭ÖйúµÚÒ»¾øÎÞÀ¬»øÓʼþɧÈų¬´óÓÊÏä 
>http://cn.mail.yahoo.com
>  
>

-- 
I would remember that if researchers were not ambitions
probably today we haven't the technology we are using!

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

* Re: Get a whole call stack through the running of target program
  2005-10-27  2:52 Get a whole call stack through the running of target program ZengNan
  2005-10-27  5:28 ` Neo Jia
@ 2005-10-27 12:44 ` Daniel Jacobowitz
  2005-10-28 18:53 ` Ramana Radhakrishnan
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2005-10-27 12:44 UTC (permalink / raw)
  To: ZengNan; +Cc: gdb

On Thu, Oct 27, 2005 at 10:52:40AM +0800, ZengNan wrote:
> Can gdb give the whole call stack from the beginning to the termination of the target program, so
> I can see the flow of the algorithm.

No.  A call stack is a single point in time; you may want a profiler
instead.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: Get a whole call stack through the running of target program
  2005-10-27  2:52 Get a whole call stack through the running of target program ZengNan
  2005-10-27  5:28 ` Neo Jia
  2005-10-27 12:44 ` Daniel Jacobowitz
@ 2005-10-28 18:53 ` Ramana Radhakrishnan
  2 siblings, 0 replies; 4+ messages in thread
From: Ramana Radhakrishnan @ 2005-10-28 18:53 UTC (permalink / raw)
  To: ZengNan; +Cc: gdb

Hi,

GDB can't do it per se but scripting on top could help you do this. 

Look at atree. http://atree.sourceforge.net  It could give you the
complete activation tree. Its some scripting on top of gdb . 

atree runs a program through GDB. It sets breakpoints on all functions
and makes a log of all the functions that got called. The log contains
the arguments and return values of the functions. This log is then
turned into a tree — a node in the tree is a function call and its
children are the functions that it called, in order.


cheers
Ramana


On Thu, 2005-10-27 at 10:52 +0800, ZengNan wrote:
> Can gdb give the whole call stack from the beginning to the termination of the target program, so
> I can see the flow of the algorithm.
> 
> 
> 	
> 
> 	
> 		
> ___________________________________________________________ 
> 雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱 
> http://cn.mail.yahoo.com

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

end of thread, other threads:[~2005-10-28 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27  2:52 Get a whole call stack through the running of target program ZengNan
2005-10-27  5:28 ` Neo Jia
2005-10-27 12:44 ` Daniel Jacobowitz
2005-10-28 18:53 ` Ramana Radhakrishnan

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 read-only IMAP folder(s) and NNTP newsgroup(s).