Currently, whenever I run into an exception under the control of Java,
the MSVS2008 Professional debugger does not get triggered, instead a
file hs*.log gets created with all sort of interesting information.

Eg. (this one is from pressing Ctl-c in a hanging ooRexx program, that
got started via Java):

    #
    # An unexpected error has been detected by Java Runtime Environment:
    #
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c921766, pid=4808, 
tid=5280
    #
    # Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode, sharing 
windows-x86)
    # Problematic frame:
    # C  [ntdll.dll+0x11766]
    #
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    #

    ---------------  T H R E A D  ---------------

    Current thread (0x02cc3400):  JavaThread "Thread-2" [_thread_in_native, 
id=5280, stack(0x03460000,0x034b0000)]

    siginfo: ExceptionCode=0xc0000005, reading address 0x3536363d

    Registers:
    EAX=0x000c0190, EBX=0x000c0000, ECX=0x7fbaf000, EDX=0x000c0608
    ESP=0x034ae594, EBP=0x034ae7b4, ESI=0x35363638, EDI=0x00000003
    EIP=0x7c921766, EFLAGS=0x00010212

    Top of Stack: (sp=0x034ae594)
    0x034ae594:   7c9200c4 00000008 00000000 7eef3fc8
    0x034ae5a4:   7eef3fc8 034ae5b8 7eef1e90 00000000
    0x034ae5b4:   034ae5f8 031d61ec 7eef3fc8 7eef3fc8
    0x034ae5c4:   4e7e8ca9 7eef1e40 7eef408c 034ae5e0
    0x034ae5d4:   031610a6 00000090 7eef4088 034ae620
    0x034ae5e4:   031750aa 00000090 4e7e8f71 7eef408c
    0x034ae5f4:   7eef4118 0325a6ac 0325a6f8 034ae624
    0x034ae604:   7eef4118 7eef4118 7eef408c 034ae61c 

    Instructions: (pc=0x7c921766)
    0x7c921756:   04 00 e9 e8 f2 ff ff 8b 70 04 83 ee 08 89 75 c8
    0x7c921766:   8a 46 05 88 45 e3 8d 4e 08 8b 39 89 bd 48 fe ff 


    Stack: [0x03460000,0x034b0000],  sp=0x034ae594,  free space=313k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native 
code)
    C  [ntdll.dll+0x11766]
    C  [kernel32.dll+0x14c05]
    *C  [rexx.dll+0xa4074]
    C  [rexx.dll+0x4255f]
    C  [rexx.dll+0x57307]
    C  [rexx.dll+0x572aa]
    C  [rexx.dll+0x1c8d9]
    C  [rexx.dll+0x51438]
    C  [rexx.dll+0x5ac96]
    C  [rexx.dll+0x4cb23]
    C  [rexx.dll+0x66b76]
    C  [BSF4Rexx.dll+0xae5e]
    C  [BSF4Rexx.dll+0x5422]*
    j  
org.rexxla.bsf.engines.rexx.RexxAndJava.jniRexxRunProgram(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;+0
    j  
org.rexxla.bsf.engines.rexx.RexxEngine.apply(Ljava/lang/String;IILjava/lang/Object;Ljava/util/Vector;Ljava/util/Vector;)Ljava/lang/Object;+295
    j  org.apache.bsf.BSFManager$1.run()Ljava/lang/Object;+28
    v  ~StubRoutines::call_stub

    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  
org.rexxla.bsf.engines.rexx.RexxAndJava.jniRexxRunProgram(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;+0
    j  
org.rexxla.bsf.engines.rexx.RexxEngine.apply(Ljava/lang/String;IILjava/lang/Object;Ljava/util/Vector;Ljava/util/Vector;)Ljava/lang/Object;+295
    j  org.apache.bsf.BSFManager$1.run()Ljava/lang/Object;+28
    v  ~StubRoutines::call_stub
    j  
java.security.AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;+0
    j  
org.apache.bsf.BSFManager.apply(Ljava/lang/String;Ljava/lang/String;IILjava/lang/Object;Ljava/util/Vector;Ljava/util/Vector;)Ljava/lang/Object;+63
    j  Test.exec(Ljava/lang/String;)Ljava/lang/String;+33
    j  Test.run()V+26
    j  Test.access$000(LTest;)V+1
    j  Test$1.run()V+15
    j  java.lang.Thread.run()V+11
    v  ~StubRoutines::call_stub

    ---------------  P R O C E S S  ---------------

    Java Threads: ( => current thread )
      0x02fa0800 JavaThread "Timer-1" [_thread_blocked, id=4432, 
stack(0x034b0000,0x03500000)]
      0x002b7000 JavaThread "DestroyJavaVM" [_thread_blocked, id=5336, 
stack(0x00a10000,0x00a60000)]
    =>0x02cc3400 JavaThread "Thread-2" [_thread_in_native, id=5280, 
stack(0x03460000,0x034b0000)]
      0x02ccb400 JavaThread "Timer-0" [_thread_blocked, id=1596, 
stack(0x03400000,0x03450000)]
      0x02c02000 JavaThread "Low Memory Detector" daemon [_thread_blocked, 
id=2504, stack(0x02eb0000,0x02f00000)]
      0x02bfbc00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3864, 
stack(0x02e60000,0x02eb0000)]
      0x02bfa400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3492, 
stack(0x02e10000,0x02e60000)]
      0x02bf9000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, 
id=3816, stack(0x02dc0000,0x02e10000)]
      0x02bf4000 JavaThread "Finalizer" daemon [_thread_blocked, id=688, 
stack(0x02d70000,0x02dc0000)]
      0x02bef800 JavaThread "Reference Handler" daemon [_thread_blocked, 
id=1428, stack(0x02d20000,0x02d70000)]

    Other Threads:
      0x02bedc00 VMThread [stack: 0x02cd0000,0x02d20000] [id=1056]
      0x02c03800 WatcherThread [stack: 0x02f00000,0x02f50000] [id=5744]

    VM state:not at safepoint (normal execution)

    VM Mutex/Monitor currently owned by a thread: None

    Heap
     def new generation   total 960K, used 218K [0x22af0000, 0x22bf0000, 
0x22fd0000)
      eden space 896K,  17% used [0x22af0000, 0x22b16858, 0x22bd0000)
      from space 64K, 100% used [0x22be0000, 0x22bf0000, 0x22bf0000)
      to   space 64K,   0% used [0x22bd0000, 0x22bd0000, 0x22be0000)
     tenured generation   total 4096K, used 128K [0x22fd0000, 0x233d0000, 
0x26af0000)
       the space 4096K,   3% used [0x22fd0000, 0x22ff01b8, 0x22ff0200, 
0x233d0000)
     compacting perm gen  total 12288K, used 285K [0x26af0000, 0x276f0000, 
0x2aaf0000)
       the space 12288K,   2% used [0x26af0000, 0x26b37680, 0x26b37800, 
0x276f0000)
        ro space 8192K,  67% used [0x2aaf0000, 0x2b052d98, 0x2b052e00, 
0x2b2f0000)
        rw space 12288K,  53% used [0x2b2f0000, 0x2b960640, 0x2b960800, 
0x2bef0000)

    Dynamic libraries:
    0x00400000 - 0x00424000     E:\jdk1.6.0_11\bin\java.exe
    0x7c910000 - 0x7c9c9000     D:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c908000     D:\WINDOWS\system32\kernel32.dll
    0x77da0000 - 0x77e4a000     D:\WINDOWS\system32\ADVAPI32.dll
    0x77e50000 - 0x77ee2000     D:\WINDOWS\system32\RPCRT4.dll
    0x77fc0000 - 0x77fd1000     D:\WINDOWS\system32\Secur32.dll
    0x636e0000 - 0x63709000     D:\Programme\Spyware Doctor\smumhook.dll
    0x770f0000 - 0x7717b000     D:\WINDOWS\system32\oleaut32.dll
    0x77ef0000 - 0x77f39000     D:\WINDOWS\system32\GDI32.dll
    0x7e360000 - 0x7e3f1000     D:\WINDOWS\system32\USER32.dll
    0x77be0000 - 0x77c38000     D:\WINDOWS\system32\msvcrt.dll
    0x774b0000 - 0x775ed000     D:\WINDOWS\system32\ole32.dll
    0x76330000 - 0x7634d000     D:\WINDOWS\system32\IMM32.DLL
    0x62e10000 - 0x62e19000     D:\WINDOWS\system32\LPK.DLL
    0x75790000 - 0x757fb000     D:\WINDOWS\system32\USP10.dll
    0x76300000 - 0x76310000     D:\WINDOWS\system32\WINSTA.dll
    0x597d0000 - 0x59825000     D:\WINDOWS\system32\NETAPI32.dll
    0x7c340000 - 0x7c396000     E:\jdk1.6.0_11\jre\bin\msvcr71.dll
    0x6d8b0000 - 0x6db06000     E:\jdk1.6.0_11\jre\bin\client\jvm.dll
    0x76af0000 - 0x76b1e000     D:\WINDOWS\system32\WINMM.dll
    0x5de80000 - 0x5de88000     D:\WINDOWS\system32\rdpsnd.dll
    0x76bb0000 - 0x76bbb000     D:\WINDOWS\system32\PSAPI.DLL
    0x6d330000 - 0x6d338000     E:\jdk1.6.0_11\jre\bin\hpi.dll
    0x6d860000 - 0x6d86c000     E:\jdk1.6.0_11\jre\bin\verify.dll
    0x6d3d0000 - 0x6d3ef000     E:\jdk1.6.0_11\jre\bin\java.dll
    0x6d8a0000 - 0x6d8af000     E:\jdk1.6.0_11\jre\bin\zip.dll
    0x10000000 - 0x1008a000     E:\rony\dev\bsf\src\source_cc_40\BSF4Rexx.dll
    0x03150000 - 0x0327f000     D:\Programme\ooRexx\rexx.dll
    0x7e670000 - 0x7ee91000     D:\WINDOWS\system32\SHELL32.dll
    0x77f40000 - 0x77fb6000     D:\WINDOWS\system32\SHLWAPI.dll
    0x03280000 - 0x032ce000     D:\Programme\ooRexx\REXXAPI.dll
    0x71a30000 - 0x71a3a000     D:\WINDOWS\system32\WSOCK32.dll
    0x71a10000 - 0x71a27000     D:\WINDOWS\system32\WS2_32.dll
    0x71a00000 - 0x71a08000     D:\WINDOWS\system32\WS2HELP.dll
    0x773a0000 - 0x774a3000     
D:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
    0x6d0b0000 - 0x6d1e8000     E:\jdk1.6.0_11\jre\bin\awt.dll
    0x72f70000 - 0x72f96000     D:\WINDOWS\system32\WINSPOOL.DRV
    0x719b0000 - 0x719f0000     D:\WINDOWS\system32\mswsock.dll
    0x66710000 - 0x66769000     D:\WINDOWS\system32\hnetcfg.dll
    0x719f0000 - 0x719f8000     D:\WINDOWS\System32\wshtcpip.dll
    0x76ee0000 - 0x76f07000     D:\WINDOWS\system32\DNSAPI.dll
    0x76f70000 - 0x76f78000     D:\WINDOWS\System32\winrnr.dll
    0x76f20000 - 0x76f4d000     D:\WINDOWS\system32\WLDAP32.dll
    0x750f0000 - 0x7510e000     D:\WINDOWS\system32\wshbth.dll
    0x778f0000 - 0x779e4000     D:\WINDOWS\system32\SETUPAPI.dll
    0x16080000 - 0x160a5000     D:\Programme\Bonjour\mdnsNSP.dll
    0x76d20000 - 0x76d39000     D:\WINDOWS\system32\Iphlpapi.dll
    0x76f80000 - 0x76f86000     D:\WINDOWS\system32\rasadhlp.dll
    0x6b1f0000 - 0x6b235000     D:\Programme\ooRexx\OREXXOLE.dll
    0x6b120000 - 0x6b179000     D:\Programme\ooRexx\rexxutil.dll
    0x746a0000 - 0x746ec000     D:\WINDOWS\system32\MSCTF.dll

    VM Arguments:
    java_command: Test
    Launcher Type: SUN_STANDARD

    Environment Variables:
    JAVA_HOME=E:\jdk1.6.0_11
    
CLASSPATH=e:\rony\dev\bsf\src;.;e:\rony\dev\bsf\src;.;.;D:\Programme\Java\jre6\lib\ext\QTJava.zip;

    [error occurred during error reporting (printing environment variables), id 
0xc0000005]



    ---------------  S Y S T E M  ---------------

    OS: Windows XP Build 2600 Service Pack 3

    CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 
stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3

    Memory: 4k page, physical 2095176k(826080k free), swap 4034928k(2595356k 
free)

    vm_info: Java HotSpot(TM) Client VM (11.0-b16) for windows-x86 JRE 
(1.6.0_11-b03), built on Nov 10 2008 02:15:12 by "java_re" with MS VC++ 7.1

    time: Sun May 24 23:38:50 2009
    elapsed time: 2 seconds


      

In the above output the trace of BSF4Rexx and Rexx invocations is
displayed, but in the following format:

    C  [rexx.dll+0xa4074]
    C  [rexx.dll+0x4255f]
    C  [rexx.dll+0x57307]
    C  [rexx.dll+0x572aa]
    C  [rexx.dll+0x1c8d9]
    C  [rexx.dll+0x51438]
    C  [rexx.dll+0x5ac96]
    C  [rexx.dll+0x4cb23]
    C  [rexx.dll+0x66b76]
    C  [BSF4Rexx.dll+0xae5e]
    C  [BSF4Rexx.dll+0x5422]
      

The question now is: is it possible to generate compiler output that
allow me to spot the point in the source, of e.g. "C
[BSF4Rexx.dll+0xae5e]" ? Currently the following files are generated:

    05/25/2009  10:15 AM             6,657 BSF4Rexx.exp
    05/25/2009  10:15 AM         1,107,564 BSF4Rexx.ilk
    05/25/2009  10:15 AM            11,646 BSF4Rexx.lib
    05/25/2009  10:15 AM           219,621 BSF4Rexx.obj
    05/25/2009  10:15 AM         2,059,264 BSF4Rexx.pdb
    05/03/2009  11:47 PM           311,281 BSF4Rexx_OREXX.lst
    05/03/2009  11:47 PM                 0 BSF4Rexx_OREXX.map  (<- size of 0 
bytes)

This would help debugging tremendeously. Currently, I am trying to
insert as many fprintf()-statements as possible to vaguely know where in
the call stack the program has arrived at. But still, it is to coarsely,
especially when running one of the many inline functions.

Any hints, pointers or help highly appreciated! (Platform: Windows XP,
Visual Studio 2008 professional)

---rony


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to