From: JR on 13 May 2010 17:46 Hello All - When I debug .net ihave the docs and automated tool to interpret .net managed objects from unmanaged code. So when i dump a native callstack and see mscorwks.dll->CallMethDesc, i know that that is the native code used to call into the .net managed code. I can then translate mscorwks.dll->CallMethDesc to myclass->myNetFunction with one command. This way i can debug mixed managed and unmanaged code very easily. I assumed Java would be similiar but i have ben unabale to find tools or documents that explain what method(s) in jvm.dll actually invoke the managed java methods and how to get that info. For example, I have this stack 08c3faac 7c827d0b 77e61d1e 000005ec 00000000 ntdll!KiFastSystemCallRet 08c3fab0 77e61d1e 000005ec 00000000 00000000 ntdll! NtWaitForSingleObject+0xc 08c3fb20 77e61c8d 000005ec ffffffff 00000000 kernel32! WaitForSingleObjectEx+0xac 08c3fb34 080a686e 000005ec ffffffff 0334b7e0 kernel32! WaitForSingleObject+0x12 08c3fb70 080c119d 0334b660 1e20dd80 0334b660 jvm!JVM_FindSignal +0x19be2 08c3fb90 0806aee5 0334b7e0 08c3fbc4 0334b660 jvm! JVM_RegisterPerfMethods+0x13126 08c3fbb0 00887a7e 0334b660 08c3fbc4 00887a52 jvm+0x6aee5 08c3fbe8 00882c03 00000000 00000000 103f98f8 0x887a7e 08c3fc1c 00882c03 00000000 103f98f8 103f9558 0x882c03 08c3fc50 00882cda 103f9558 1e20de20 08c3fc60 0x882c03 08c3fd64 08070c8a 08c3fd98 08c3ff3c 0000000a 0x882cda 08c3fde4 080aab6d 0000000a 00000000 08c3fe94 jvm+0x70c8a 08c3fe20 08070b97 08070b9c 08c3ff34 08c3fe48 jvm!JVM_FindSignal +0x1dee1 08c3fe3c 08070893 08c3ff34 0334b7dc 08c3fe94 jvm+0x70b97 i know this is executing a managed function but don't know how to get that data. Does anyone know the tools or methods used to do this? It looks like the jvm!JVM_FindSignal function is responsible for setting up and calling managed java code but i am not sure.
From: Arne Vajhøj on 13 May 2010 19:14 On 13-05-2010 17:46, JR wrote: > When I debug .net ihave the docs and automated tool to interpret .net > managed objects from unmanaged code. So when i dump a native callstack > and see mscorwks.dll->CallMethDesc, i know that that is the native > code used to call into the .net managed code. I can then translate > mscorwks.dll->CallMethDesc to myclass->myNetFunction with one command. > This way i can debug mixed managed and unmanaged code very easily. I > assumed Java would be similiar but i have ben unabale to find tools or > documents that explain what method(s) in jvm.dll actually invoke the > managed java methods and how to get that info. managed-unmanaged is not prioritized as high i Java as in .NET, so I am not surprised that the tool support is not as good. But somewhere there must be some map for jvm.dll. The extreme solution for you would be to get OpenJDK and build it with the options to debug it. Arne
From: Lew on 13 May 2010 19:26 JR wrote: > When I debug .net i [sic]have the docs and automated tool to interpret .net > managed objects from unmanaged code. So when i [sic] dump a native callstack > and see mscorwks.dll->CallMethDesc, i [sic] know that that is the native > code used to call into the .net managed code. I can then translate > mscorwks.dll->CallMethDesc to myclass->myNetFunction with one command. > This way i [sic] can debug mixed managed and unmanaged code very easily. I > assumed Java would be similiar but i [sic] have ben unabale to find tools or > documents that explain what method(s) in jvm.dll actually invoke the > managed java [sic] methods and how to get that info. For example, I have > this stack > > > 08c3faac 7c827d0b 77e61d1e 000005ec 00000000 ntdll!KiFastSystemCallRet > 08c3fab0 77e61d1e 000005ec 00000000 00000000 ntdll! > NtWaitForSingleObject+0xc > 08c3fb20 77e61c8d 000005ec ffffffff 00000000 kernel32! > WaitForSingleObjectEx+0xac > 08c3fb34 080a686e 000005ec ffffffff 0334b7e0 kernel32! > WaitForSingleObject+0x12 > 08c3fb70 080c119d 0334b660 1e20dd80 0334b660 jvm!JVM_FindSignal > +0x19be2 > 08c3fb90 0806aee5 0334b7e0 08c3fbc4 0334b660 jvm! > JVM_RegisterPerfMethods+0x13126 > 08c3fbb0 00887a7e 0334b660 08c3fbc4 00887a52 jvm+0x6aee5 > 08c3fbe8 00882c03 00000000 00000000 103f98f8 0x887a7e > 08c3fc1c 00882c03 00000000 103f98f8 103f9558 0x882c03 > 08c3fc50 00882cda 103f9558 1e20de20 08c3fc60 0x882c03 > 08c3fd64 08070c8a 08c3fd98 08c3ff3c 0000000a 0x882cda > 08c3fde4 080aab6d 0000000a 00000000 08c3fe94 jvm+0x70c8a > 08c3fe20 08070b97 08070b9c 08c3ff34 08c3fe48 jvm!JVM_FindSignal > +0x1dee1 > 08c3fe3c 08070893 08c3ff34 0334b7dc 08c3fe94 jvm+0x70b97 > > i [sic] know this is executing a managed function but don't know how to get > that data. Does anyone know the tools or methods used to do this? It > looks like the jvm!JVM_FindSignal function is responsible for setting > up and calling managed java [sic] code but i [sic] am not sure. Don't do that. The word "managed" has no relevance in Java because the word "unmanaged" has no meaning. Everything is "managed". There is no "managed function", just "method". -- Lew
From: JR on 13 May 2010 19:36 On May 13, 6:26 pm, Lew <no...(a)lewscanon.com> wrote: > JR wrote: > > When I debug .net i [sic]have the docs and automated tool to interpret ..net > > managed objects from unmanaged code. So when i [sic] dump a native callstack > > and see mscorwks.dll->CallMethDesc, i [sic] know that that is the native > > code used to call into the .net managed code. I can then translate > > mscorwks.dll->CallMethDesc to myclass->myNetFunction with one command. > > This way i [sic] can debug mixed managed and unmanaged code very easily.. I > > assumed Java would be similiar but i [sic] have ben unabale to find tools or > > documents that explain what method(s) in jvm.dll actually invoke the > > managed java [sic] methods and how to get that info. For example, I have > > this stack > > > 08c3faac 7c827d0b 77e61d1e 000005ec 00000000 ntdll!KiFastSystemCallRet > > 08c3fab0 77e61d1e 000005ec 00000000 00000000 ntdll! > > NtWaitForSingleObject+0xc > > 08c3fb20 77e61c8d 000005ec ffffffff 00000000 kernel32! > > WaitForSingleObjectEx+0xac > > 08c3fb34 080a686e 000005ec ffffffff 0334b7e0 kernel32! > > WaitForSingleObject+0x12 > > 08c3fb70 080c119d 0334b660 1e20dd80 0334b660 jvm!JVM_FindSignal > > +0x19be2 > > 08c3fb90 0806aee5 0334b7e0 08c3fbc4 0334b660 jvm! > > JVM_RegisterPerfMethods+0x13126 > > 08c3fbb0 00887a7e 0334b660 08c3fbc4 00887a52 jvm+0x6aee5 > > 08c3fbe8 00882c03 00000000 00000000 103f98f8 0x887a7e > > 08c3fc1c 00882c03 00000000 103f98f8 103f9558 0x882c03 > > 08c3fc50 00882cda 103f9558 1e20de20 08c3fc60 0x882c03 > > 08c3fd64 08070c8a 08c3fd98 08c3ff3c 0000000a 0x882cda > > 08c3fde4 080aab6d 0000000a 00000000 08c3fe94 jvm+0x70c8a > > 08c3fe20 08070b97 08070b9c 08c3ff34 08c3fe48 jvm!JVM_FindSignal > > +0x1dee1 > > 08c3fe3c 08070893 08c3ff34 0334b7dc 08c3fe94 jvm+0x70b97 > > > i [sic] know this is executing a managed function but don't know how to get > > that data. Does anyone know the tools or methods used to do this? It > > looks like the jvm!JVM_FindSignal function is responsible for setting > > up and calling managed java [sic] code but i [sic] am not sure. > > Don't do that. > > The word "managed" has no relevance in Java because the word "unmanaged" has > no meaning. Everything is "managed". There is no "managed function", just > "method". > > -- > Lew- Hide quoted text - > > - Show quoted text - consider it native code run by cpu vs byte code run by jvm. You understand what im getting at though right?
From: Arne Vajhøj on 13 May 2010 19:46
On 13-05-2010 19:26, Lew wrote: > The word "managed" has no relevance in Java because the word "unmanaged" > has no meaning. Everything is "managed". There is no "managed function", > just "method". It is .NET terminology. Translation to Java: managed = Java code unmanaged = native code Arne |