public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Treedump output
@ 2004-09-08 14:16 Svein E. Seldal
  2004-09-08 14:22 ` Paul Brook
  2004-09-08 14:27 ` Dave Korn
  0 siblings, 2 replies; 7+ messages in thread
From: Svein E. Seldal @ 2004-09-08 14:16 UTC (permalink / raw)
  To: gcc

Hello,

This might sound as a silly question, but I'm kind of stuck, and I cant 
find anyting that helps in the sources/docs/internet. Can I get some 
help please? :)

The docs sais that you can use "-da" and/or "-fdump-tree-all" to get 
dump outputs. But when I try this on avr-gcc or its cc1, nothing 
happens. Are there some configure option I have forgotten when building 
the tools. Or can it be some commandline option that I need add to get 
it to provide the output I want?

I have compiled gcc HEAD for the avr target with the configure option 
"../configure --target=avr --disable-nls --enable-languages=c". And the 
compiler command that doesnt provide the dumps are: "avr-gcc -da 
-fdump-tree-all -c tree.c". The same thing happens if I use the 
-fdump-tree-all command to cc1 directly. It seems to recognize the 
option, but it doesnt provide any output.


Regards,
Svein

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

* Re: Treedump output
  2004-09-08 14:16 Treedump output Svein E. Seldal
@ 2004-09-08 14:22 ` Paul Brook
  2004-09-08 14:51   ` Svein E. Seldal
  2004-09-08 14:27 ` Dave Korn
  1 sibling, 1 reply; 7+ messages in thread
From: Paul Brook @ 2004-09-08 14:22 UTC (permalink / raw)
  To: gcc; +Cc: Svein E. Seldal

On Wednesday 08 September 2004 15:15, Svein E. Seldal wrote:
> Hello,
>
> This might sound as a silly question, but I'm kind of stuck, and I cant
> find anyting that helps in the sources/docs/internet. Can I get some
> help please? :)
>
> The docs sais that you can use "-da" and/or "-fdump-tree-all" to get
> dump outputs. But when I try this on avr-gcc or its cc1, nothing
> happens. Are there some configure option I have forgotten when building
> the tools. Or can it be some commandline option that I need add to get
> it to provide the output I want?
>
> I have compiled gcc HEAD for the avr target with the configure option
> "../configure --target=avr --disable-nls --enable-languages=c". And the
> compiler command that doesnt provide the dumps are: "avr-gcc -da
> -fdump-tree-all -c tree.c". The same thing happens if I use the
> -fdump-tree-all command to cc1 directly. It seems to recognize the
> option, but it doesnt provide any output.

Are you sure? It should create numbered files named 
tree.c.<number>.<something> and tree.c.t<number>.<something>.
The console output from the compiler is unchanged.

Paul

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

* RE: Treedump output
  2004-09-08 14:16 Treedump output Svein E. Seldal
  2004-09-08 14:22 ` Paul Brook
@ 2004-09-08 14:27 ` Dave Korn
  1 sibling, 0 replies; 7+ messages in thread
From: Dave Korn @ 2004-09-08 14:27 UTC (permalink / raw)
  To: 'Svein E. Seldal', gcc

> -----Original Message-----
> From: gcc-owner On Behalf Of Svein E. Seldal
> Sent: 08 September 2004 15:15

> The docs sais that you can use "-da" and/or "-fdump-tree-all" to get 
> dump outputs. But when I try this on avr-gcc or its cc1, nothing 
> happens. Are there some configure option I have forgotten 
> when building 
> the tools. Or can it be some commandline option that I need 
> add to get 
> it to provide the output I want?
> 
> I have compiled gcc HEAD for the avr target with the configure option 
> "../configure --target=avr --disable-nls 
> --enable-languages=c". And the 
> compiler command that doesnt provide the dumps are: "avr-gcc -da 
> -fdump-tree-all -c tree.c". The same thing happens if I use the 
> -fdump-tree-all command to cc1 directly. It seems to recognize the 
> option, but it doesnt provide any output.


  Dump output files often tend to end up in your source directory rather
than your build directory.  If you're using separate source and build
directories, have you checked the source dir yet?

[  Yes, I also think this is a somewhat surprising way for the feature to
work.  ]

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

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

* Re: Treedump output
  2004-09-08 14:22 ` Paul Brook
@ 2004-09-08 14:51   ` Svein E. Seldal
  2004-09-08 15:10     ` Svein E. Seldal
  0 siblings, 1 reply; 7+ messages in thread
From: Svein E. Seldal @ 2004-09-08 14:51 UTC (permalink / raw)
  To: Paul Brook; +Cc: gcc

Paul Brook wrote:
> Are you sure? It should create numbered files named 
> tree.c.<number>.<something> and tree.c.t<number>.<something>.
> The console output from the compiler is unchanged.

Yes, I'm sure. That's why I'm asking. And yes, I find this strange as well.


$ ./cc1 --version
GNU C version 3.5.0 20040907 (experimental) (avr)
         compiled by GNU C version 3.3.4 (Debian 1:3.3.4-11).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
$ ls
tree.c
$ ./cc1 --help |grep dump
   -d<letters>                 Enable dumps from specific passes of the 
compiler
   -dumpbase <file>            Set the file basename to be used for dumps
   -fdump-<type>               Dump various compiler internals to a file
   -fdump-unnumbered           Suppress output of instruction numbers 
and line
                               number notes in debugging dumps
$ ./cc1 -fdump-tree-all -da tree.c

Execution times (seconds)
  parser                :   0.01 (100%) usr   0.00 ( 0%) sys   0.00 ( 
0%) wall
  TOTAL                 :   0.01             0.00             0.10
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --disable-checking to disable checks.
$ ls
tree.c  tree.s


Nada. Zip. Nothing


Svein

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

* Re: Treedump output
  2004-09-08 14:51   ` Svein E. Seldal
@ 2004-09-08 15:10     ` Svein E. Seldal
  2004-09-08 15:53       ` Svein E. Seldal
  0 siblings, 1 reply; 7+ messages in thread
From: Svein E. Seldal @ 2004-09-08 15:10 UTC (permalink / raw)
  To: Svein E. Seldal; +Cc: Paul Brook, gcc

Hello

@Paul: no offence taken :)  I'm as confused about this as you are.


To give input to Daves reply:


$ strace ./cc1 -fdump-tree-all -da tree.c 2>&1 |grep open
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or 
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
open("tree.c", O_RDONLY|O_NOCTTY)       = 3
open("tree.s", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
open("tree.gcda", O_RDWR)               = -1 ENOENT (No such file or 
directory)

And if touch "tree.gcda" to make it exist, no data will be present in 
this file.

I think I will compile myself a native compiler using this source to see 
if the same problem is present on that target.


Svein

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

* Re: Treedump output
  2004-09-08 15:10     ` Svein E. Seldal
@ 2004-09-08 15:53       ` Svein E. Seldal
  2004-09-08 16:03         ` Diego Novillo
  0 siblings, 1 reply; 7+ messages in thread
From: Svein E. Seldal @ 2004-09-08 15:53 UTC (permalink / raw)
  Cc: gcc

Hi,

It seems the problem was caused by myself (again) :) (thanks Daniel Berlin).

The file that I was compiling was empty except for the line "int foo = 
42;". When I add a C function to this file, the compiler will start 
giving out a lot of debug files.

BUT: This misses my point of my debug output. I'm not interested in 
debugging the internal statements of a function. I'm insterested in how 
the compiler handles typedef's, variables and initialization (including 
strings) in the trees. And according to what I've seen so far, only 
function debug output is given using -fdump-tree. Shoot.

I thought that -fdump-tree dumped the entire tree that it had build up 
in memory and not only a function sub-set. Or are there any ways to get 
everything dumped to an output file?


Svein

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

* Re: Treedump output
  2004-09-08 15:53       ` Svein E. Seldal
@ 2004-09-08 16:03         ` Diego Novillo
  0 siblings, 0 replies; 7+ messages in thread
From: Diego Novillo @ 2004-09-08 16:03 UTC (permalink / raw)
  To: Svein E. Seldal; +Cc: gcc

On Wed, 2004-09-08 at 11:52, Svein E. Seldal wrote:

> I thought that -fdump-tree dumped the entire tree that it had build up 
> in memory and not only a function sub-set. Or are there any ways to get 
> everything dumped to an output file?
> 
No.  By design.


Diego.

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

end of thread, other threads:[~2004-09-08 16:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-08 14:16 Treedump output Svein E. Seldal
2004-09-08 14:22 ` Paul Brook
2004-09-08 14:51   ` Svein E. Seldal
2004-09-08 15:10     ` Svein E. Seldal
2004-09-08 15:53       ` Svein E. Seldal
2004-09-08 16:03         ` Diego Novillo
2004-09-08 14:27 ` Dave Korn

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