public class RedbookGCD
{
public static void main( String [] args )
{
System.out.println( "GCD of " + args[0] + " and " + args[1] );
new RedbookGCD().gcd( Long.parseLong( args[0] ), Long.parseLong( args[1] ) );
}
private void gcd( long _one, long _two )
{
System.out.println( "Recurse: " + _one + " " + _two );
if( _one > _two )
{
this.gcd( _two, _one % _two );
}
else
{
this.gcd( _one, _two % _one );
}
}
}
|
$ java RedbookGCD 9832984798732984 12321453153
GCD of 9832984798732984 and 12321453153
Recurse: 9832984798732984 12321453153
Recurse: 12321453153 9288872323
Recurse: 9288872323 3032580830
Recurse: 3032580830 191129833
Recurse: 191129833 165633335
Recurse: 165633335 25496498
Recurse: 25496498 12654347
Recurse: 12654347 187804
Recurse: 187804 71479
Recurse: 71479 44846
Recurse: 44846 26633
Recurse: 26633 18213
Recurse: 18213 8420
Recurse: 8420 1373
Recurse: 1373 182
Recurse: 182 99
Recurse: 99 83
Recurse: 83 16
Recurse: 16 3
Recurse: 3 1
Recurse: 1 0
Exception in thread "main" java.lang.ArithmeticException: divide by zero
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.gcd(RedbookGCD.java:15)
at RedbookGCD.main(RedbookGCD.java:7)
|
java -Xdump:system:events=throw,filter=*Arithmetic* RedbookGCD 9832984798732984 12321453153
|
Confirm Java Fault Entry Reanalysis Line 1 Col 1 76
Command ===> Scroll ===> CSR
Java DTFJ processing has not yet completed for this fault entry.
Press Enter to continue reanalysis with incomplete Java information, or
press PF3/PF12 to cancel.
*** Bottom of data.
F1=Help F3=Exit F5=RptFind F7=Up F8=Down F12=Cancel
|
File View Services Help
Interactive Reanalysis Report Line 1 Col 1 132
Command ===> Scroll ===> CSR
JOBNAME: KYKWAN5 ABEND: n/a FAE1 2011/10/18 15:05:10
Fault Summary:
Module /apc/java531-UK53749/usr/lpp/java/J5.0/bin/libj9prt23.so offset X'716':
No abend could be determined--possible loop or wait situation.
Select one of the following options to access further fault information:
1. Synopsis
2. Event Summary
3. Java Information
4. Storage Areas
5. Language Environment Heap Analysis
6. Abend Job Information
7. Fault Analyzer Options
*** Bottom of data.
F1=Help F3=Exit F4=Dsect F5=RptFind F6=Actions F7=Up F8=Down F10=Left F11=Right
*FAULTA
|
File View Services Help
Java Information Line 32 Col 1 132
Command ===> Scroll ===> CSR
JOBNAME: KYKWAN5 ABEND: n/a FAE1 2011/10/18 15:05:10
Java VM init args
args
arg=-Xjcl:jclscar_23
arg=-Dcom.ibm.oti.vm.bootstrap.library.path=/apc/java531-UK53749/usr/lpp/java/J5.0/bin
arg=-Dsun.boot.library.path=/apc/java531-UK53749/usr/lpp/java/J5.0/bin
arg=-Djava.library.path=/apc/java531-UK53749/usr/lpp/java/J5.0/bin:/apc/java531-UK53749/usr/lpp/java/J5.0/bin/classic/libjvm.so:
/apc/java531-UK53749/usr/lpp/java/J5.0/bin/classic:/apc/java531-UK53749/usr/lpp/java/J5.0/bin/:/u/kykwan/java_test:/lib:/usr/lib
:/apc/java531-UK53749/usr/lpp/java/J5.0/bin:/apc/java531-UK53749/usr/lpp/java/J5.0/bin/classic:/u/kykwan/idijlib:.:
arg=-Djava.home=/apc/java531-UK53749/usr/lpp/java/J5.0
arg=-Djava.ext.dirs=/apc/java531-UK53749/usr/lpp/java/J5.0/lib/ext
arg=-Duser.dir=/u/kykwan/java_test
arg=_j2se_j9=70912
arg=-Xdump
arg=vfprintf
arg=-Xdump:system:events=throw,filter=*Arithmetic*
arg=-Dinvokedviajava
arg=-Djava.class.path=/u/kykwan/java_test:/apc/java531-UK53749/usr/lpp/java/J5.0/lib/tools.jar:/u/kykwan/idijlib/IDIServer.jar:/
u/kykwan/idijlib/log4j-1.2.14.jar:
arg=vfprintf
arg=_port_library
Java threads with traceback information
Call trace for thread: main
Method Location
RedbookGCD.gcd RedbookGCD.java:15
RedbookGCD.gcd RedbookGCD.java:15
RedbookGCD.gcd RedbookGCD.java:15
RedbookGCD.gcd RedbookGCD.java:15
RedbookGCD.gcd RedbookGCD.java:15
RedbookGCD.gcd RedbookGCD.java:15
RedbookGCD.gcd RedbookGCD.java:15
RedbookGCD.gcd RedbookGCD.java:15
F1=Help F3=Exit F4=Dsect F5=RptFind F6=Actions F7=Up F8=Down F10=Left F11=Right
*FAULTA
|
File View Services Help
Event Summary Top of data
Command ===> Scroll ===> CSR
JOBNAME: KYKWAN5 ABEND: n/a FAE1 2011/10/18 15:05:10
Event Fail Module Program EP
# Type Point Name Name Name Event Location (*) Description
1 Call CEEPLPKA n/a CEEBBEXT E+1B8 BOOTSTRAP MODULE FOR Language Environment; From LPA
2 Call CELHV003 n/a EDCZHINV E+B4 CRTL Main invocation event XPLINK; From not determined
3 >>> XPLink CEEPLPKA n/a n/a M+1CBD44 CEL Common Runtime; From LPA
4 Call java main main E+2AF4 From /apc/java531-UK53749/usr/lpp/java/J5.0/bin/
5 Java n/a n/a RedbookGCD.main
L#7 From not determined
6 Call libj9vm23.so
triggerExceptionThrowEvent
triggerExceptionThrowEvent
E+2C From /apc/java531-UK53749/usr/lpp/java/J5.0/bin/
|
File View Services Help
Event 5 of 18: Java Line 1 Col 1 132
Command ===> Scroll ===> CSR
JOBNAME: KYKWAN5 ABEND: n/a FAE1 2011/10/18 15:05:10
Previous Event Details
This event occurred in Class RedbookGCD Method main.
Java source from /u/kykwan/java_test/RedbookGCD.java:
Source
Line #
-5 public class RedbookGCD
-4 {
-3 .public static void main( String [] args )
-2 .{
-1 ..System.out.println( "GCD of " + args[0] + " and " + args[1] );
000007 ..new RedbookGCD().gcd( Long.parseLong( args[0] ), Long.parseLong( args[1] ) );
+1 .}
+2
+3 .private void gcd( long _one, long _two )
+4 .{
+5 ..System.out.println( "Recurse: " + _one + " " + _two );
The class static variable information is not available.
The object instance variable information is not available.
Next Event Details
*** Bottom of data.
F1=Help F3=Exit F4=Dsect F5=RptFind F6=Actions F7=Up F8=Down F10=Left F11=Right
*FAULTA
|
File View Services Help
RedbookGCD.main Java Source Line 1 Col 1 132
Command ===> Scroll ===> CSR
JOBNAME: KYKWAN5 ABEND: n/a FAE1 2011/10/18 15:05:10
Java source from /u/kykwan/java_test/RedbookGCD.java.
Source
Line #
000001
000002 public class RedbookGCD
000003 {
000004 .public static void main( String [] args )
000005 .{
000006 ..System.out.println( "GCD of " + args[0] + " and " + args[1] );
000007 ..new RedbookGCD().gcd( Long.parseLong( args[0] ), Long.parseLong( args[1] ) );
000008 .}
000009
000010 .private void gcd( long _one, long _two )
000011 .{
000012 ..System.out.println( "Recurse: " + _one + " " + _two );
000013 ..if( _one > _two )
000014 ..{
000015 ...this.gcd( _two, _one % _two );
000016 ..}
000017 ..else
000018 ..{
000019 ...this.gcd( _one, _two % _one );
000020 ..}
000021 .}
000022 }
*** Bottom of data.
F1=Help F3=Exit F4=Dsect F5=RptFind F6=Actions F7=Up F8=Down F10=Left F11=Right
*FAULTA
|
Resume icon: The Resume icon is the green arrow in the Debug view toolbar. It is circled in green in Figure 9-22.
|
Resume icon: The Resume icon is the green arrow in the Debug view toolbar. It is circled in green in Figure 9-24.
|
18.227.72.15