* [tree-ssa] Tree browser unstable ?
@ 2003-04-03 14:33 Matthieu Moy
2003-04-03 16:09 ` Diego Novillo
0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Moy @ 2003-04-03 14:33 UTC (permalink / raw)
To: gcc
Hi,
I'm using the tree-ssa branch of GCC, and starting to play with the
tree browser to understand the code.
(http://gcc.gnu.org/projects/tree-ssa/tree-browser.html).
It is an interesting option, but I find it very unstable. I rather
often get error messages like this :
,----
| (gdb) p browse_tree (fndecl)
|
| Tree Browser
| myfunc
|
| /home/moy/essais/c++/hello.cc:6: internal compiler error: in walk_tree, at
| tree-inline.c:1557
| Please submit a full bug report,
| with preprocessed source if appropriate.
| See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
|
| Program exited with code 01.
| The program being debugged stopped while in a function called from GDB.
| When the function (browse_tree) is done executing, GDB will silently
| stop (instead of continuing to evaluate the expression containing
| the function call).
`----
So, my question is : Am I doing something wrong, or is the tree
browser supposed to be robust to any kinds of use (So, should I make a
bug report each time I get this kind of message ?)
--
Matthieu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tree-ssa] Tree browser unstable ?
2003-04-03 14:33 [tree-ssa] Tree browser unstable ? Matthieu Moy
@ 2003-04-03 16:09 ` Diego Novillo
2003-04-03 16:33 ` Pop Sébastian
0 siblings, 1 reply; 3+ messages in thread
From: Diego Novillo @ 2003-04-03 16:09 UTC (permalink / raw)
To: Matthieu Moy; +Cc: gcc
On Thu, 2003-04-03 at 08:02, Matthieu Moy wrote:
> Hi,
>
> I'm using the tree-ssa branch of GCC, and starting to play with the
> tree browser to understand the code.
> (http://gcc.gnu.org/projects/tree-ssa/tree-browser.html).
>
> It is an interesting option, but I find it very unstable. I rather
> often get error messages like this :
>
Not surprising. The tree browser is an experimental feature. You're
essentially using the initial revision of the code.
Diego.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tree-ssa] Tree browser unstable ?
2003-04-03 16:09 ` Diego Novillo
@ 2003-04-03 16:33 ` Pop Sébastian
0 siblings, 0 replies; 3+ messages in thread
From: Pop Sébastian @ 2003-04-03 16:33 UTC (permalink / raw)
To: Diego Novillo; +Cc: Matthieu Moy, gcc
On Thu, Apr 03, 2003 at 08:26:48AM -0500, Diego Novillo wrote:
> On Thu, 2003-04-03 at 08:02, Matthieu Moy wrote:
> > It is an interesting option, but I find it very unstable. I rather
> > often get error messages like this :
> >
> Not surprising. The tree browser is an experimental feature. You're
> essentially using the initial revision of the code.
>
This could also happen if the function's trees are not available:
have a look at the value of current_function_decl:
/* The FUNCTION_DECL for the function currently being compiled,
or 0 if between functions. */
tree current_function_decl;
It is also possible that there are some errors in the browser's code:
I didn't tested it on the c++ front-end.
The walk_tree is mainly used for registering the information about the
parent expressions, but you can use the browser without the "up" commands.
Try for example the following patch:
Index: tree-browser.c
===================================================================
RCS file: /home/pop/cvsroot/gcc-cvs/gcc/gcc/Attic/tree-browser.c,v
retrieving revision 1.1.2.2
diff -u -3 -p -c -r1.1.2.2 tree-browser.c
*** tree-browser.c 3 Dec 2002 22:54:32 -0000 1.1.2.2
--- tree-browser.c 3 Apr 2003 14:26:38 -0000
*************** TB_parent_eq (p1, p2)
*** 873,893 ****
static void
TB_update_up (node)
! tree node;
{
- while (node)
- {
- walk_tree (&node, store_child_info, NULL, NULL);
-
- /* Walk function's body. */
- if (TREE_CODE (node) == FUNCTION_DECL)
- if (DECL_SAVED_TREE (node))
- walk_tree (&DECL_SAVED_TREE (node), store_child_info, NULL, NULL);
-
- /* Walk rest of the chain. */
- node = TREE_CHAIN (node);
- }
- fprintf (TB_OUT_FILE, "Up/prev expressions updated.\n");
}
/* Parse the input string for determining the command the user asked for. */
--- 873,880 ----
static void
TB_update_up (node)
! tree node ATTRIBUTE_UNUSED;
{
}
/* Parse the input string for determining the command the user asked for. */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-03 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-03 14:33 [tree-ssa] Tree browser unstable ? Matthieu Moy
2003-04-03 16:09 ` Diego Novillo
2003-04-03 16:33 ` Pop Sébastian
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).