Christoph Pospiech <christoph.pospi...@de.ibm.com> wrote on 09/06/2010 
05:41:59 PM:

> On Monday, September 06, 2010 09:46:17 pm Igor Peshansky wrote:
> > Hi, Christoph,
> > 
> > We are working on transforming the exception tracebacks to show X10 
source
> > information.
> > 
> > In the meantime, you would have to look at the generated C++ sources 
for
> > matmul__closure__12 (probably in the file matmul.inc, possibly in 
matmul.h
> > if matmul is a generic class) and look at the "//#line" comment that
> > precedes the body of the closure.  That will get you the original X10 
line
> > number.
> >         Igor
> 
> Igor,
> 
> thanks for the information.
> 
> matmul__closure__12 is indeed a class (in the *.inc file). The body of 
the 
> closure contains several source lines : 165 -- 187.
> 
> Any chance on narrowing in on this ?

Sure.  On Linux and Mac, the backtrace in the exception traceback should 
also
include the C++ line number of the throwException() call.  If you look at
that C++ line, you should see the //#line comment above it for the 
(explicit
or implicit) "throw" in the X10 source.  The kind of exception you get 
should
also help narrow this down (e.g., a NullPointerException will result from 
an
implicit null check in the X10 source).

If you do not get the C++ line numbers in the trace, you can also run your
program under gdb and set a breakpoint in
'x10aux::throwException(x10aux::ref<x10::lang::Throwable>)'.  When you hit
this breakpoint, go up a frame and you should end up on the C++ line that
caused the exception to be thrown.  Again, the "//#line" comment above 
that
C++ line should point you to the corresponding X10 source line.

See also 
http://x10.codehaus.org/X10+Application+Development#X10ApplicationDevelopment-SinglePlaceDebugging%28withGDB%29
 
.

Hope this helps,
        Igor
-- 
Igor Peshansky  (note the spelling change!)
IBM T.J. Watson Research Center
X10: Parallel Productivity and Performance (http://x10-lang.org/)
XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/)
"I hear and I forget.  I see and I remember.  I do and I understand" -- 
Confucius


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to