Hi -

On 6/28/16, 2:50 PM, "Jyothi Krishna.V.S" <[email protected]> wrote:

>Hi,
>I have a few quires in debugging chapel compiler in Linux.
>
>
>(i) Do we have any flag that can be set to enable gdb debugging? which
>tools are used usually to debug chapel compilers ?
>

I usually run the compiler in gdb.
E.g.

gdb --args chpl hello.chpl
break set gdbShouldBreakHere()
run

>
>(ii) What are the usual cases when  we see the following error
>
>
>Internal errors indicate a bug in the Chapel compiler ("It's us, not
>you"),
>and we're sorry for the hassle.  We would appreciate your reporting this
>bug -- 
>please see http://chapel.cray.com/bugs.html for instructions.  In the
>meantime,
>the filename + line number above may be useful in working around the
>issue.

If you have run it in gdb as above, with a breakpoint on
gdbShouldBreakHere,
you should be able to inspect the situation causing the internal failure.

>
>
>iii) Is there a way  to print the contents of my node? I tried the
>following code but it crashed.
>
>
>        std::ostream * o;
>        Expr->prettyPrint(o);
>        o->flush();

Assuming you are talking about an AST node.

print print_view(someAstVariable)

will print out an AST node.


More information on debugging the compiler is available here:

https://github.com/chapel-lang/chapel/blob/master/doc/developer/bestPractic
es/CompilerDebugging.txt
https://github.com/chapel-lang/chapel/blob/master/doc/developer/bestPractic
es/CompilerIRTricks.txt


Cheers,

-michael


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to