public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* printing "tree" type data
@ 2007-06-04 14:21 ranjith kumar
  2007-06-04 23:19 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: ranjith kumar @ 2007-06-04 14:21 UTC (permalink / raw)
  To: gcc-help

Hi,
    I want to print the last statement(which is of
"tree" type) in a given basic block. 

The last statement of a basic-block pointed by bb can
be get by last_stmt(bb);
I want to see that instruction.

I want to print that statement to a dump file or
standard output. Ordinary data types can be printed by
fprintf in source code. But how to print "tree" data
type?




      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 

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

* Re: printing "tree" type data
  2007-06-04 14:21 printing "tree" type data ranjith kumar
@ 2007-06-04 23:19 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2007-06-04 23:19 UTC (permalink / raw)
  To: ranjith kumar; +Cc: gcc-help

ranjith kumar <ranjit_kumar_b4u@yahoo.co.uk> writes:

>     I want to print the last statement(which is of
> "tree" type) in a given basic block. 
> 
> The last statement of a basic-block pointed by bb can
> be get by last_stmt(bb);
> I want to see that instruction.
> 
> I want to print that statement to a dump file or
> standard output. Ordinary data types can be printed by
> fprintf in source code. But how to print "tree" data
> type?

Look at the debug_tree and debug_generic_stmt functions.

Look at gcc/gdbinit.in for some useful gdb macros.

Ian

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

end of thread, other threads:[~2007-06-04 23:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-04 14:21 printing "tree" type data ranjith kumar
2007-06-04 23:19 ` Ian Lance Taylor

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