harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r597138 [1/15] - in /harmony/enhanced/drlvm/trunk: build/make/ build/make/components/vm/ vm/include/ vm/include/open/ vm/jitrino/src/codegenerator/ia32/ vm/port/src/encoder/ia32_em64t/ vm/port/src/lil/ia32/pim/ vm/tests/ncai/ vm/tests/ncai/...
Date Wed, 21 Nov 2007 16:29:54 GMT
Author: gshimansky
Date: Wed Nov 21 08:29:40 2007
New Revision: 597138

URL: http://svn.apache.org/viewvc?rev=597138&view=rev
Log:
Committed NCAI contribution from HARMONY-4689
All VM tests passed on 4 platforms in debug mode.


Added:
    harmony/enhanced/drlvm/trunk/vm/include/ncai.h   (with props)
    harmony/enhanced/drlvm/trunk/vm/include/ncai_types.h   (with props)
    harmony/enhanced/drlvm/trunk/vm/include/open/ncai_thread.h   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/README.txt   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02n/GetAllModules02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02n/GetAllModules02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules03/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules03/GetAllModules03.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules03/GetAllModules03.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads01/GetAllThreads01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads01/GetAllThreads01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads01n/GetAllThreads01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads01n/GetAllThreads01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads02/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads02/GetAllThreads02.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads02/GetAllThreads02.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads02n/GetAllThreads02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllThreads/GetAllThreads02n/GetAllThreads02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount01/GetFrameCount01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount01/GetFrameCount01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount01n/GetFrameCount01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount01n/GetFrameCount01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount02n/GetFrameCount02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount02n/GetFrameCount02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount03/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount03/GetFrameCount03.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount03/GetFrameCount03.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount03n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount03n/GetFrameCount03n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount03n/GetFrameCount03n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount04n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount04n/GetFrameCount04n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount04n/GetFrameCount04n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount05n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount05n/GetFrameCount05n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount05n/GetFrameCount05n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount06n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount06n/GetFrameCount06n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetFrameCount/GetFrameCount06n/GetFrameCount06n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo01/GetModuleInfo01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo01/GetModuleInfo01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo01n/GetModuleInfo01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo01n/GetModuleInfo01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo02n/GetModuleInfo02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetModuleInfo/GetModuleInfo02n/GetModuleInfo02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace01/GetStackTrace01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace01/GetStackTrace01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace01n/GetStackTrace01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace01n/GetStackTrace01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace02/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace02/GetStackTrace02.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace02/GetStackTrace02.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace02n/GetStackTrace02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace02n/GetStackTrace02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace03/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace03/GetStackTrace03.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace03/GetStackTrace03.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace03n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace03n/GetStackTrace03n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace03n/GetStackTrace03n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace04/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace04/GetStackTrace04.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace04/GetStackTrace04.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace04n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace04n/GetStackTrace04n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace04n/GetStackTrace04n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace05n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace05n/GetStackTrace05n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace05n/GetStackTrace05n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace06n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace06n/GetStackTrace06n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetStackTrace/GetStackTrace06n/GetStackTrace06n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle01/GetThreadHandle01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle01/GetThreadHandle01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle01n/GetThreadHandle01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle01n/GetThreadHandle01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle02/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle02/GetThreadHandle02.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle02/GetThreadHandle02.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle02n/GetThreadHandle02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadHandle/GetThreadHandle02n/GetThreadHandle02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo01/GetThreadInfo01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo01/GetThreadInfo01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo01n/GetThreadInfo01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo01n/GetThreadInfo01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo02/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo02/GetThreadInfo02.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo02/GetThreadInfo02.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo02n/GetThreadInfo02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetThreadInfo/GetThreadInfo02n/GetThreadInfo02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory01/ReadMemory01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory01/ReadMemory01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory02/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory02/ReadMemory02.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory02/ReadMemory02.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory03/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory03/ReadMemory03.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory03/ReadMemory03.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory04/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory04/ReadMemory04.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/ReadMemory/ReadMemory04/ReadMemory04.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread01/ResumeThread01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread01/ResumeThread01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread01n/ResumeThread01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread01n/ResumeThread01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread02n/ResumeThread02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread02n/ResumeThread02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread03n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread03n/ResumeThread03n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/ResumeThread03n/ResumeThread03n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread01/SuspendThread01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread01/SuspendThread01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread01n/SuspendThread01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread01n/SuspendThread01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread02/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread02/SuspendThread02.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread02/SuspendThread02.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread02n/SuspendThread02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread02n/SuspendThread02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread03n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread03n/SuspendThread03n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/SuspendResumeThread/SuspendThread03n/SuspendThread03n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread01/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread01/TerminateThread01.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread01/TerminateThread01.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread01n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread01n/TerminateThread01n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread01n/TerminateThread01n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread02/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread02/TerminateThread02.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread02/TerminateThread02.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread02n/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread02n/TerminateThread02n.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/TerminateThread/TerminateThread02n/TerminateThread02n.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/ms_envs.sh   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/parse_args.sh   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/share/
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/share/events.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/share/events.h   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/share/utils.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/share/utils.h   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/start.sh   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/test_build.sh   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/test_list.sh   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/ncai/test_run.sh   (with props)
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ncai_common.c   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/ncai_direct.h   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/ncai_internal.h   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/ncai_utils.h   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/NCAI.html   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/README   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_break.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_event.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_memory.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_methods.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_modules.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_registers.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_signals.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_stack.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_step.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_thread.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_memory_linux.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_memory_win.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_modules_linux.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_modules_win.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_signals_linux.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_signals_win.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_step_em64t.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_step_ia32.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_step_ipf.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_em64t.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_ia32.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_ipf.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_linux.cpp   (with props)
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_win.cpp   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/build/make/build.xml
    harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Encoder.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.h
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_prvt.h
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/stack_iterator_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def
    harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp
    harmony/enhanced/drlvm/trunk/vm/thread/src/linux/os_thread.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h
    harmony/enhanced/drlvm/trunk/vm/thread/src/win/os_thread.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_break_intf.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_dasm.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_direct.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_internal.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/natives_support.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/thread_manager.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_dasm.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_extension.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_stack.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/natives_support.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32_em64t/nt_exception_filter_common.cpp

Modified: harmony/enhanced/drlvm/trunk/build/make/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/build.xml?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/build.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/build.xml Wed Nov 21 08:29:40 2007
@@ -752,8 +752,10 @@
             <fileset dir="${build.VM.home}/include">
                 <include name="jni_types.h" />
                 <include name="jvmti_types.h" />
+                <include name="ncai_types.h" />
                 <include name="jni.h" />
                 <include name="jvmti.h" />
+                <include name="ncai.h" />
             </fileset>
         </copy>
     </target>

Modified: harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml Wed Nov 21 08:29:40 2007
@@ -90,6 +90,7 @@
                 <include name="jit/*.cpp" />
                 <include name="jni/*.cpp" />
                 <include name="jvmti/*.cpp" />
+                <include name="ncai/*.cpp" />
                 <include name="object/*.cpp" />
                 <include name="reflection/*.cpp" />
                 <include name="stack/*.cpp" />
@@ -122,6 +123,7 @@
             <fileset dir="${build.vm.home}/vmcore/src">
                 <include name="thread/win/*.cpp" if="is.windows"/>
                 <include name="util/win/*.cpp" if="is.windows"/>
+                <include name="ncai/utils/*win.cpp" if="is.windows"/>
 
                 <include name="util/win/ia32/*.cpp" if="is.windows.x86"/>
                 <include name="util/win/em64t/*.cpp" if="is.windows.x86_64"/>
@@ -132,8 +134,13 @@
                 <include name="util/ia32/**/*.cpp" if="is.x86"/>
                 <include name="util/em64t/**/*.cpp" if="is.x86_64"/>
 
+                <include name="ncai/utils/*ipf.cpp" if="is.ia64"/>
+                <include name="ncai/utils/*ia32.cpp" if="is.x86"/>
+                <include name="ncai/utils/*em64t.cpp" if="is.x86_64"/>
+
                 <include name="thread/linux/*.cpp" if="is.unix"/>
                 <include name="util/linux/*.cpp" if="is.unix"/>
+                <include name="ncai/utils/*linux.cpp" if="is.unix"/>
                 <exclude name="util/linux/signals_ia32.cpp" unless="is.unix.x86"/>
                 <exclude name="util/linux/signals_em64t.cpp" unless="is.unix.x86_64"/>
                 <exclude name="util/linux/signals_ipf.cpp" unless="is.unix.ia64"/>

Added: harmony/enhanced/drlvm/trunk/vm/include/ncai.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/ncai.h?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/ncai.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/include/ncai.h Wed Nov 21 08:29:40 2007
@@ -0,0 +1,422 @@
+/**
+ * @author Intel, Petr Ivanov
+ * @version $Revision$
+ */
+#ifndef _NCAI_H_
+#define _NCAI_H_
+
+#include "ncai_types.h"
+#include "jni_types.h"
+
+
+/*
+ * Supported NCAI versions
+ */
+#define NCAI_VERSION_MASK_MAJOR 0x0FFF0000
+#define NCAI_VERSION_MASK_MINOR 0x0000FF00
+#define NCAI_VERSION_MASK_MICRO 0x000000FF
+#define NCAI_VERSION_SHIFT_MAJOR 16
+#define NCAI_VERSION_SHIFT_MINOR 8
+#define NCAI_VERSION_SHIFT_MICRO 0
+
+#define NCAI_VERSION_MAJOR 1
+#define NCAI_VERSION_MINOR 0
+#define NCAI_VERSION_MICRO 3
+
+#define NCAI_VERSION_1_0 \
+    ((NCAI_VERSION_MAJOR << NCAI_VERSION_SHIFT_MAJOR) | \
+     (NCAI_VERSION_MINOR << NCAI_VERSION_SHIFT_MINOR) | \
+     (NCAI_VERSION_MICRO << NCAI_VERSION_SHIFT_MICRO))
+
+#define NCAI_VERSION NCAI_VERSION_1_0
+
+
+struct _ncai
+{
+    ncaiError (JNICALL *GetAllLoadedModules) (ncaiEnv* env,
+        jint* count_ptr,
+        ncaiModule** modules_ptr);
+
+    ncaiError (JNICALL *GetModuleInfo) (ncaiEnv* env,
+        ncaiModule module,
+        ncaiModuleInfo* info_ptr);
+
+    ncaiError (JNICALL *GetModuleClassLoader) (ncaiEnv* env,
+        ncaiModule module,
+        jobject* classloader_ptr);
+
+    ncaiError (JNICALL *IsMethodCompiled) (ncaiEnv* env,
+        jmethodID method,
+        jboolean* is_compiled_ptr);
+
+    ncaiError (JNICALL *GetMethodLocation) (ncaiEnv* env,
+        jmethodID method,
+        void** address_ptr,
+        size_t* size_ptr);
+
+    ncaiError (JNICALL *FindJavaMethod) (ncaiEnv* env,
+        void* address,
+        jmethodID* method_ptr);
+
+    ncaiError (JNICALL *GetBytcodeLocation) (ncaiEnv* env,
+        void* address,
+        jmethodID* method,
+        jlocation* location_ptr);
+
+    ncaiError (JNICALL *GetNativeLocation) (ncaiEnv* env,
+        jmethodID method,
+        jlocation location,
+        void** address_ptr);
+
+    ncaiError (JNICALL *GetAllThreads) (ncaiEnv* env,
+        jint* count_ptr,
+        ncaiThread** threads_ptr);
+
+    ncaiError (JNICALL *GetThreadInfo) (ncaiEnv* env,
+        ncaiThread thread,
+        ncaiThreadInfo* info_ptr);
+
+    ncaiError (JNICALL *GetThreadHandle) (ncaiEnv* env,
+        jthread thread,
+        ncaiThread* thread_ptr);
+
+    ncaiError (JNICALL *GetThreadObject) (ncaiEnv* env,
+        ncaiThread thread,
+        jthread* thread_ptr);
+
+    ncaiError (JNICALL *SuspendThread) (ncaiEnv* env,
+        ncaiThread thread);
+
+    ncaiError (JNICALL *ResumeThread) (ncaiEnv* env,
+        ncaiThread thread);
+
+    ncaiError (JNICALL *TerminateThread) (ncaiEnv* env,
+        ncaiThread thread);
+
+    ncaiError (JNICALL *GetThreadState) (ncaiEnv* env,
+        ncaiThread thread,
+        jint* state_ptr);
+
+    ncaiError (JNICALL *GetFrameCount) (ncaiEnv* env,
+        ncaiThread thread,
+        jint* count_ptr);
+
+    ncaiError (JNICALL *GetStackTrace) (ncaiEnv* env,
+        ncaiThread thread,
+        jint depth,
+        ncaiFrameInfo* frame_buffer,
+        jint* count_ptr);
+
+    ncaiError (JNICALL *GetRegisterCount) (ncaiEnv* env,
+        jint* count_ptr);
+
+    ncaiError (JNICALL *GetRegisterInfo) (ncaiEnv* env,
+        jint reg_number,
+        ncaiRegisterInfo* info_ptr);
+
+    ncaiError (JNICALL *GetRegisterValue) (ncaiEnv* env,
+        ncaiThread thread,
+        jint reg_number,
+        void* buf);
+
+    ncaiError (JNICALL *SetRegisterValue) (ncaiEnv* env,
+        ncaiThread thread,
+        jint reg_number,
+        void* buf);
+
+    ncaiError (JNICALL *ReadMemory) (ncaiEnv* env,
+        void* addr,
+        size_t size,
+        void* buf);
+
+    ncaiError (JNICALL *WriteMemory) (ncaiEnv* env,
+        void* addr,
+        size_t size,
+        void* buf);
+
+    ncaiError (JNICALL *GetSignalCount) (ncaiEnv* env,
+        jint* count_ptr);
+
+    ncaiError (JNICALL *GetSignalInfo) (ncaiEnv* env,
+        jint signal,
+        ncaiSignalInfo* info_ptr);
+
+    ncaiError (JNICALL *GetJvmtiEnv) (ncaiEnv* env,
+        jvmtiEnv** jvmti_env_ptr);
+
+    ncaiError (JNICALL *GetVersion) (ncaiEnv* env,
+        jint* version_ptr);
+
+    ncaiError (JNICALL *GetErrorName) (ncaiEnv* env,
+        ncaiError err,
+        const char** name_ptr);
+
+    ncaiError (JNICALL *GetPotentialCapabilities) (ncaiEnv* env,
+        ncaiCapabilities* caps_ptr);
+
+    ncaiError (JNICALL *GetCapabilities) (ncaiEnv* env,
+        ncaiCapabilities* caps_ptr);
+
+    ncaiError (JNICALL *AddCapabilities) (ncaiEnv* env,
+        ncaiCapabilities* caps_ptr);
+
+    ncaiError (JNICALL *RelinquishCapabilities) (ncaiEnv* env,
+        ncaiCapabilities* caps_ptr);
+
+    ncaiError (JNICALL *GetEventCallbacks) (ncaiEnv* env,
+        ncaiEventCallbacks* callbacks,
+        size_t size);
+
+    ncaiError (JNICALL *SetEventCallbacks) (ncaiEnv* env,
+        ncaiEventCallbacks* callbacks,
+        size_t size);
+
+    ncaiError (JNICALL *SetEventNotificationMode) (ncaiEnv* env,
+        ncaiEventMode mode,
+        ncaiEventKind event,
+        ncaiThread thread);
+
+    ncaiError (JNICALL *SetBreakpoint) (ncaiEnv* env,
+        void* code_addr);
+
+    ncaiError (JNICALL *ClearBreakpoint) (ncaiEnv* env,
+        void* code_addr);
+
+    ncaiError (JNICALL *SetWatchpoint) (ncaiEnv* env,
+        void* data_addr,
+        size_t len,
+        ncaiWatchpointMode mode);
+
+    ncaiError (JNICALL *ClearWatchpoint) (ncaiEnv* env,
+        void* data_addr);
+
+    ncaiError (JNICALL *SetStepMode) (ncaiEnv* env,
+        ncaiThread thread,
+        ncaiStepMode mode);
+
+    ncaiError (JNICALL *NotifyFramePop) (ncaiEnv* env,
+        ncaiThread thread,
+        void* frame_address);
+};
+
+struct ncaiEnv_struct
+{
+    const struct _ncai* funcs;
+
+#ifdef __cplusplus
+
+    ncaiError GetAllLoadedModules (jint* count_ptr, ncaiModule** modules_ptr)
+    {
+        return funcs->GetAllLoadedModules (this, count_ptr, modules_ptr);
+    }
+
+    ncaiError GetModuleInfo (ncaiModule module, ncaiModuleInfo* info_ptr)
+    {
+        return funcs->GetModuleInfo (this, module, info_ptr);
+    }
+
+    ncaiError GetModuleClassLoader (ncaiModule module, jobject* classloader_ptr)
+    {
+        return funcs->GetModuleClassLoader (this, module, classloader_ptr);
+    }
+
+    ncaiError IsMethodCompiled (jmethodID method, jboolean* is_compiled_ptr)
+    {
+        return funcs->IsMethodCompiled (this, method, is_compiled_ptr);
+    }
+
+    ncaiError GetMethodLocation (jmethodID method, void** address_ptr, size_t* size_ptr)
+    {
+        return funcs->GetMethodLocation (this, method, address_ptr, size_ptr);
+    }
+
+    ncaiError FindJavaMethod (void* address, jmethodID* method_ptr)
+    {
+        return funcs->FindJavaMethod (this, address, method_ptr);
+    }
+
+    ncaiError GetBytcodeLocation (void* address, jmethodID* method, jlocation* location_ptr)
+    {
+        return funcs->GetBytcodeLocation (this, address, method, location_ptr);
+    }
+
+    ncaiError GetNativeLocation (jmethodID method, jlocation location, void** address_ptr)
+    {
+        return funcs->GetNativeLocation (this, method, location, address_ptr);
+    }
+
+    ncaiError GetAllThreads (jint* count_ptr, ncaiThread** threads_ptr)
+    {
+        return funcs->GetAllThreads (this, count_ptr, threads_ptr);
+    }
+
+    ncaiError GetThreadInfo (ncaiThread thread, ncaiThreadInfo* info_ptr)
+    {
+        return funcs->GetThreadInfo (this, thread, info_ptr);
+    }
+
+    ncaiError GetThreadHandle (jthread thread, ncaiThread* thread_ptr)
+    {
+        return funcs->GetThreadHandle (this, thread, thread_ptr);
+    }
+
+    ncaiError GetThreadObject (ncaiThread thread, jthread* thread_ptr)
+    {
+        return funcs->GetThreadObject (this, thread, thread_ptr);
+    }
+
+    ncaiError SuspendThread (ncaiThread thread)
+    {
+        return funcs->SuspendThread (this, thread);
+    }
+
+    ncaiError ResumeThread (ncaiThread thread)
+    {
+        return funcs->ResumeThread (this, thread);
+    }
+
+    ncaiError TerminateThread (ncaiThread thread)
+    {
+        return funcs->TerminateThread (this, thread);
+    }
+
+    ncaiError GetThreadState (ncaiThread thread, jint* state_ptr)
+    {
+        return funcs->GetThreadState (this, thread, state_ptr);
+    }
+
+    ncaiError GetFrameCount (ncaiThread thread, jint* count_ptr)
+    {
+        return funcs->GetFrameCount (this, thread, count_ptr);
+    }
+
+    ncaiError GetStackTrace (ncaiThread thread, jint depth, ncaiFrameInfo* frame_buffer, jint* count_ptr)
+    {
+        return funcs->GetStackTrace (this, thread, depth, frame_buffer, count_ptr);
+    }
+
+    ncaiError GetRegisterCount (jint* count_ptr)
+    {
+        return funcs->GetRegisterCount (this, count_ptr);
+    }
+
+    ncaiError GetRegisterInfo (jint reg_number, ncaiRegisterInfo* info_ptr)
+    {
+        return funcs->GetRegisterInfo (this, reg_number, info_ptr);
+    }
+
+    ncaiError GetRegisterValue (ncaiThread thread, jint reg_number, void* buf)
+    {
+        return funcs->GetRegisterValue (this, thread, reg_number, buf);
+    }
+
+    ncaiError SetRegisterValue (ncaiThread thread, jint reg_number, void* buf)
+    {
+        return funcs->SetRegisterValue (this, thread, reg_number, buf);
+    }
+
+    ncaiError ReadMemory (void* addr, size_t size, void* buf)
+    {
+        return funcs->ReadMemory (this, addr, size, buf);
+    }
+
+    ncaiError WriteMemory (void* addr, size_t size, void* buf)
+    {
+        return funcs->WriteMemory (this, addr, size, buf);
+    }
+
+    ncaiError GetSignalCount (jint* count_ptr)
+    {
+        return funcs->GetSignalCount (this, count_ptr);
+    }
+
+    ncaiError GetSignalInfo (jint signal, ncaiSignalInfo* info_ptr)
+    {
+        return funcs->GetSignalInfo (this, signal, info_ptr);
+    }
+
+    ncaiError GetJvmtiEnv (jvmtiEnv** jvmti_env_ptr)
+    {
+        return funcs->GetJvmtiEnv (this, jvmti_env_ptr);
+    }
+
+    ncaiError GetVersion (jint* version_ptr)
+    {
+        return funcs->GetVersion (this, version_ptr);
+    }
+
+    ncaiError GetErrorName (ncaiError err, const char** name_ptr)
+    {
+        return funcs->GetErrorName (this, err, name_ptr);
+    }
+
+    ncaiError GetPotentialCapabilities (ncaiCapabilities* caps_ptr)
+    {
+        return funcs->GetPotentialCapabilities (this, caps_ptr);
+    }
+
+    ncaiError GetCapabilities (ncaiCapabilities* caps_ptr)
+    {
+        return funcs->GetCapabilities (this, caps_ptr);
+    }
+
+    ncaiError AddCapabilities (ncaiCapabilities* caps_ptr)
+    {
+        return funcs->AddCapabilities (this, caps_ptr);
+    }
+
+    ncaiError RelinquishCapabilities (ncaiCapabilities* caps_ptr)
+    {
+        return funcs->RelinquishCapabilities (this, caps_ptr);
+    }
+
+    ncaiError GetEventCallbacks (ncaiEventCallbacks* callbacks, size_t size)
+    {
+        return funcs->GetEventCallbacks (this, callbacks, size);
+    }
+
+    ncaiError SetEventCallbacks (ncaiEventCallbacks* callbacks, size_t size)
+    {
+        return funcs->SetEventCallbacks (this, callbacks, size);
+    }
+
+    ncaiError SetEventNotificationMode (ncaiEventMode mode, ncaiEventKind event, ncaiThread thread)
+    {
+        return funcs->SetEventNotificationMode (this, mode, event, thread);
+    }
+
+    ncaiError SetBreakpoint (void* code_addr)
+    {
+        return funcs->SetBreakpoint (this, code_addr);
+    }
+
+    ncaiError ClearBreakpoint (void* code_addr)
+    {
+        return funcs->ClearBreakpoint (this, code_addr);
+    }
+
+    ncaiError SetWatchpoint (void* data_addr, size_t len, ncaiWatchpointMode mode)
+    {
+        return funcs->SetWatchpoint (this, data_addr, len, mode);
+    }
+
+    ncaiError ClearWatchpoint (void* data_addr)
+    {
+        return funcs->ClearWatchpoint (this, data_addr);
+    }
+
+    ncaiError SetStepMode (ncaiThread thread, ncaiStepMode mode)
+    {
+        return funcs->SetStepMode (this, thread, mode);
+    }
+
+    ncaiError NotifyFramePop (ncaiThread thread, void* frame_address)
+    {
+        return funcs->NotifyFramePop (this, thread, frame_address);
+    }
+
+#endif
+};
+
+
+#endif /* _NCAI_H_ */

Propchange: harmony/enhanced/drlvm/trunk/vm/include/ncai.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/include/ncai_types.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/ncai_types.h?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/ncai_types.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/include/ncai_types.h Wed Nov 21 08:29:40 2007
@@ -0,0 +1,213 @@
+/**
+ * @author Intel, Petr Ivanov
+ * @version $Revision: 1.1.2.10 $
+ */
+#ifndef _NCAI_TYPES_H_
+#define _NCAI_TYPES_H_
+
+#include <stddef.h>
+#include "jvmti_types.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    struct _ncai;
+    struct ncaiEnv_struct;
+
+#ifdef __cplusplus
+    typedef ncaiEnv_struct ncaiEnv;
+#else
+    typedef const struct _ncai* ncaiEnv;
+#endif
+
+
+    typedef enum { //TBD - work on NCAI errors
+        // Universal errors
+        NCAI_ERROR_NONE = 0,
+        NCAI_ERROR_NULL_POINTER = 100,
+        NCAI_ERROR_ILLEGAL_ARGUMENT = 103,
+        NCAI_ERROR_OUT_OF_MEMORY = 110,
+        NCAI_ERROR_ACCESS_DENIED = 111,
+        NCAI_ERROR_UNATTACHED_THREAD = 115,
+        NCAI_ERROR_INVALID_ENVIRONMENT = 116,
+        NCAI_ERROR_INTERNAL = 113,
+        // function specific
+        NCAI_ERROR_INVALID_THREAD = 10,
+        NCAI_ERROR_THREAD_NOT_SUSPENDED = 13,
+        NCAI_ERROR_THREAD_SUSPENDED = 14,
+        NCAI_ERROR_THREAD_NOT_ALIVE = 15,
+        NCAI_ERROR_INVALID_METHOD = 23,
+        NCAI_ERROR_INVALID_LOCATION = 24,
+        NCAI_ERROR_DUPLICATE = 40,
+        NCAI_ERROR_NOT_FOUND = 41,
+        NCAI_ERROR_NOT_AVAILABLE = 98,
+        NCAI_ERROR_INTERPRETER_USED = 201,
+        NCAI_ERROR_NOT_COMPILED = 211,
+        NCAI_ERROR_INVALID_ADDRESS = 212,
+        NCAI_ERROR_INVALID_MODULE = 213,
+    } ncaiError;
+
+    typedef enum {
+        NCAI_MODULE_JNI_LIBRARY,
+        NCAI_MODULE_VM_INTERNAL,
+        NCAI_MODULE_OTHER
+    } ncaiModuleKind;
+
+    typedef enum {
+        NCAI_SEGMENT_UNKNOWN,
+        NCAI_SEGMENT_CODE,
+        NCAI_SEGMENT_DATA
+    } ncaiSegmentKind;
+
+    typedef struct {
+        ncaiSegmentKind kind;
+        void* base_address;
+        size_t size;
+    } ncaiSegmentInfo;
+
+    typedef struct {
+        ncaiModuleKind kind;
+        char* name;
+        char* filename;
+        ncaiSegmentInfo* segments;
+        size_t segment_count;
+    } ncaiModuleInfo;
+
+    struct _ncaiModule;
+    typedef _ncaiModule* ncaiModule;
+
+    struct _ncaiThread;
+    typedef _ncaiThread* ncaiThread;
+
+    typedef enum {
+        NCAI_THREAD_JAVA,
+        NCAI_THREAD_VM_INTERNAL,
+        NCAI_THREAD_OTHER
+    } ncaiThreadKind;
+
+    typedef struct {
+        ncaiThreadKind kind;
+        char* name;
+    } ncaiThreadInfo;
+
+
+    typedef struct {
+        jint java_frame_depth;
+        void* pc_address;
+        void* return_address;
+        void* frame_address;
+        void* stack_address;
+    } ncaiFrameInfo;
+
+
+    typedef struct {
+        char* name;
+        jint size;
+    } ncaiRegisterInfo;
+
+
+    typedef struct {
+        char* name;
+    } ncaiSignalInfo;
+
+
+    typedef struct {
+    } ncaiCapabilities;
+
+
+    typedef void (JNICALL * ncaiThreadStart)
+        (ncaiEnv* env, ncaiThread thread);
+    typedef void (JNICALL * ncaiThreadEnd)
+        (ncaiEnv* env, ncaiThread thread);
+    typedef void (JNICALL * ncaiBreakpoint)
+        (ncaiEnv *env, ncaiThread thread, void *addr);
+    typedef void (JNICALL * ncaiStep)
+        (ncaiEnv *env, ncaiThread thread, void *addr);
+    typedef void (JNICALL * ncaiWatchpoint)
+        (ncaiEnv *env, ncaiThread thread, void *code_addr, void *data_addr);
+    typedef void (JNICALL * ncaiMethodEntry)
+        (ncaiEnv* env, ncaiThread thread, void* addr);
+    typedef void (JNICALL * ncaiMethodExit)
+        (ncaiEnv* env, ncaiThread thread, void* addr);
+    typedef void (JNICALL * ncaiFramePop)
+        (ncaiEnv* env, ncaiThread thread, void* addr);
+    typedef void (JNICALL * ncaiSignal)
+        (ncaiEnv *env, ncaiThread thread, void *addr, jint signal, jboolean is_internal, jboolean* is_handled);
+    typedef void (JNICALL * ncaiException)
+        (ncaiEnv *env, ncaiThread thread, void *addr, void *exception);
+    typedef void (JNICALL * ncaiModuleLoad)
+        (ncaiEnv *env, ncaiThread thread, ncaiModule module);
+    typedef void (JNICALL * ncaiModuleUnload)
+        (ncaiEnv *env, ncaiThread thread, ncaiModule module);
+    typedef void (JNICALL * ncaiConsoleInput)
+        (ncaiEnv *env, char **message);
+    typedef void (JNICALL * ncaiConsoleOutput)
+        (ncaiEnv *env, char *message);
+    typedef void (JNICALL * ncaiDebugMessage)
+        (ncaiEnv *env, char *message);
+
+    typedef enum {
+        NCAI_ENABLE = 1,
+        NCAI_DISABLE = 0
+    } ncaiEventMode;
+
+    typedef enum {
+        NCAI_MIN_EVENT_TYPE_VAL = 1,
+        NCAI_EVENT_THREAD_START = NCAI_MIN_EVENT_TYPE_VAL,
+        NCAI_EVENT_THREAD_END,
+        NCAI_EVENT_BREAKPOINT,
+        NCAI_EVENT_STEP,
+        NCAI_EVENT_WATCHPOINT,
+        NCAI_EVENT_METHOD_ENTRY,
+        NCAI_EVENT_METHOD_EXIT,
+        NCAI_EVENT_FRAME_POP,
+        NCAI_EVENT_SIGNAL,
+        NCAI_EVENT_EXCEPTION,
+        NCAI_EVENT_MODULE_LOAD,
+        NCAI_EVENT_MODULE_UNLOAD,
+        NCAI_EVENT_CONSOLE_INPUT,
+        NCAI_EVENT_CONSOLE_OUTPUT,
+        NCAI_EVENT_DEBUG_OUTPUT,
+        NCAI_MAX_EVENT_TYPE_VAL = NCAI_EVENT_DEBUG_OUTPUT
+    } ncaiEventKind;
+
+    typedef struct
+    {
+        ncaiThreadStart ThreadStart;
+        ncaiThreadEnd ThreadEnd;
+        ncaiBreakpoint Breakpoint;
+        ncaiStep Step;
+        ncaiWatchpoint Watchpoint;
+        ncaiMethodEntry MethodEntry;
+        ncaiMethodExit MethodExit;
+        ncaiFramePop FramePop;
+        ncaiSignal Signal;
+        ncaiException Exception;
+        ncaiModuleLoad ModuleLoad;
+        ncaiModuleUnload ModuleUnload;
+        ncaiConsoleInput ConsoleInput;
+        ncaiConsoleOutput ConsoleOutput;
+        ncaiDebugMessage DebugMessage;
+    }ncaiEventCallbacks;
+
+    typedef enum {
+        NCAI_WATCHPOINT_READ,
+        NCAI_WATCHPOINT_WRITE,
+        NCAI_WATCHPOINT_ACCESS
+    } ncaiWatchpointMode;
+
+    typedef enum {
+        NCAI_STEP_OFF,
+        NCAI_STEP_INTO,
+        NCAI_STEP_OVER,
+        NCAI_STEP_OUT
+    } ncaiStepMode;
+
+
+#ifdef __cplusplus
+}               /* extern "C" { */
+#endif
+
+#endif /* _NCAI_TYPES_H_ */

Propchange: harmony/enhanced/drlvm/trunk/vm/include/ncai_types.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/include/open/ncai_thread.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/ncai_thread.h?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/ncai_thread.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/ncai_thread.h Wed Nov 21 08:29:40 2007
@@ -0,0 +1,75 @@
+/*
+ *  Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Ilya Berezhniuk
+ * @version $Revision$
+ */
+
+#ifndef OPEN_NCAI_THREAD_H
+#define OPEN_NCAI_THREAD_H
+
+/**
+ * @file ncai_thread.h
+ * @brief NCAI thread support
+ * @details
+ * Support for NCAI threading functionality.
+ * Is needed because NCAI must gether some OS-specific information,
+ * encapsulated within thread manager.
+ * All functions start with hythread_* prefix.
+ */
+
+#include "jvmti_types.h"
+#include "hythread_ext.h"
+
+
+#ifdef WIN32
+/* Thread context definition for Windows */
+typedef CONTEXT  os_thread_context_t;
+#else
+/* Thread context definition for UNIX-like systems */
+#include <sys/ucontext.h>
+typedef ucontext_t  os_thread_context_t;
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/** @name Threads manipulation and information
+ */
+//@{
+
+extern HY_CFUNC IDATA VMCALL
+hythread_suspend_thread_native PROTOTYPE((hythread_t thread));
+extern HY_CFUNC IDATA VMCALL
+hythread_resume_thread_native PROTOTYPE((hythread_t thread));
+extern HY_CFUNC int VMCALL
+hythread_get_suspend_count_native PROTOTYPE((hythread_t thread));
+
+extern HY_CFUNC IDATA VMCALL
+hythread_get_thread_context PROTOTYPE((hythread_t thread, os_thread_context_t* pcontext));
+extern HY_CFUNC IDATA VMCALL
+hythread_set_thread_context PROTOTYPE((hythread_t thread, os_thread_context_t* pcontext));
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* OPEN_NCAI_THREAD_H */

Propchange: harmony/enhanced/drlvm/trunk/vm/include/open/ncai_thread.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Encoder.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Encoder.cpp?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Encoder.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Encoder.cpp Wed Nov 21 08:29:40 2007
@@ -364,11 +364,15 @@
           register kind
     */
     for (unsigned i=0; !opcodes[i].last; i++) {
+        const OpcodeDesc* pOpcodeDesc = opcodes + i;
+        if (pOpcodeDesc->platf == OpcodeInfo::decoder) {
+            continue;
+        }
         //
         // fill out an OpcodeDesc for each given opcode
         //
         OpcodeDescription od;
-        initOD(od, opcodes + i);
+        initOD(od, pOpcodeDesc);
         //
         // try to find a group for the opcodeDesc in already filled groups
         //

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.cpp?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.cpp Wed Nov 21 08:29:40 2007
@@ -366,10 +366,11 @@
     assert(inst.mn == mn);
     assert(len == (unsigned)(stream-saveStream));
     if (mn == Mnemonic_CALL || mn == Mnemonic_JMP || 
+        Mnemonic_RET == mn ||
         (Mnemonic_JO<=mn && mn<=Mnemonic_JG)) {
         assert(inst.argc == opnds.count());
         
-        InstructionDisassembler idi(saveStream, (unsigned char)0xCC);
+        InstructionDisassembler idi(saveStream);
         
         for (unsigned i=0; i<inst.argc; i++) {
             const EncoderBase::Operand& original = opnds[i];
@@ -378,13 +379,16 @@
             assert(original.size() == decoded.size());
             if (original.is_imm()) {
                 assert(original.imm() == decoded.imm());
-                assert(idi.get_opnd(0).kind == Kind_Imm);
+                assert(idi.get_opnd(0).kind == InstructionDisassembler::Kind_Imm);
                 if (mn == Mnemonic_CALL) {
                     assert(idi.get_type() == InstructionDisassembler::RELATIVE_CALL);
                 }
                 else if (mn == Mnemonic_JMP) {
                     assert(idi.get_type() == InstructionDisassembler::RELATIVE_JUMP);
                 }
+                else if (mn == Mnemonic_RET) {
+                    assert(idi.get_type() == InstructionDisassembler::RET);
+                }
                 else {
                     assert(idi.get_type() == InstructionDisassembler::RELATIVE_COND_JUMP);
                 }
@@ -394,7 +398,7 @@
                 assert(original.index() == decoded.index());
                 assert(original.scale() == decoded.scale());
                 assert(original.disp() == decoded.disp());
-                assert(idi.get_opnd(0).kind == Kind_Mem);
+                assert(idi.get_opnd(0).kind == InstructionDisassembler::Kind_Mem);
                 if (mn == Mnemonic_CALL) {
                     assert(idi.get_type() == InstructionDisassembler::INDIRECT_CALL);
                 }
@@ -408,7 +412,7 @@
             else {
                 assert(original.is_reg());
                 assert(original.reg() == decoded.reg());
-                assert(idi.get_opnd(0).kind == Kind_Reg);
+                assert(idi.get_opnd(0).kind == InstructionDisassembler::Kind_Reg);
                 if (mn == Mnemonic_CALL) {
                     assert(idi.get_type() == InstructionDisassembler::INDIRECT_CALL);
                 }
@@ -717,6 +721,9 @@
         bool found = false;
         for (idx=0; !odesc[idx].last; idx++) {
             const OpcodeDesc& opcode = odesc[idx];
+            if (opcode.platf == OpcodeInfo::decoder) {
+                continue;
+            }
             if (opcode.roles.count != opnds.count()) {
                 continue;
             }
@@ -728,6 +735,9 @@
         if (!found) {
             for (idx=0; !odesc[idx].last; idx++) {
                 const OpcodeDesc& opcode = odesc[idx];
+                if (opcode.platf == OpcodeInfo::decoder) {
+                    continue;
+                }
                 if (opcode.roles.count != opnds.count()) {
                     continue;
                 }
@@ -747,6 +757,7 @@
     const OpcodeDesc * odesc = &opcodes[mn][opcodeIndex];
     assert(!odesc->last);
     assert(odesc->roles.count == opnds.count());
+    assert(odesc->platf != OpcodeInfo::decoder);
 #if !defined(_EM64T_)
     // tuning was done for IA32 only, so no size restriction on EM64T
     //assert(sizeof(OpcodeDesc)==128);

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.h?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_base.h Wed Nov 21 08:29:40 2007
@@ -241,6 +241,7 @@
            *        the list of opcodes for a given mnemonic.
            */
            char            last;
+           char            platf;
        };
    };
 public:

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h Wed Nov 21 08:29:40 2007
@@ -466,11 +466,11 @@
 Mnemonic_DIVSD,                         // Divide Scalar Double-Precision Floating-Point Values
 Mnemonic_DIVSS,                         // Divide Scalar Single-Precision Floating-Point Values
 
-
 #ifdef _HAVE_MMX_
 Mnemonic_EMMS,                          // Empty MMX Technology State
 #endif
 
+Mnemonic_ENTER,                         // ENTER-Make Stack Frame for Procedure Parameters
 Mnemonic_FLDCW,                         // Load FPU control word
 Mnemonic_FADDP,                        
 Mnemonic_FLDZ,                        
@@ -528,6 +528,7 @@
     CCM(J,NLE), CCM(J,G),
 Mnemonic_JMP,                           // Jump
 Mnemonic_LEA,                           // Load Effective Address
+Mnemonic_LEAVE,                         // High Level Procedure Exit
 Mnemonic_LOOP,                          // Loop according to ECX counter
 Mnemonic_LOOPE,                          // Loop according to ECX counter
 Mnemonic_LOOPNE, Mnemonic_LOOPNZ = Mnemonic_LOOPNE, // Loop according to ECX 

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_prvt.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_prvt.h?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_prvt.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_prvt.h Wed Nov 21 08:29:40 2007
@@ -141,7 +141,7 @@
 #define AX          {OpndKind_GPReg, OpndSize_16, RegName_AX}
 #define EAX         {OpndKind_GPReg, OpndSize_32, RegName_EAX}
 #ifdef _EM64T_
-    #define RAX     { OpndKind_GPReg, OpndSize_64, RegName_RAX }
+    #define RAX     {OpndKind_GPReg, OpndSize_64, RegName_RAX }
 #endif
 
 #define CL          {OpndKind_GPReg, OpndSize_8, RegName_CL}
@@ -192,9 +192,19 @@
 #define imm16       {OpndKind_Imm, OpndSize_16, RegName_Null}
 #define imm32       {OpndKind_Imm, OpndSize_32, RegName_Null}
 #ifdef _EM64T_
-    #define imm64   { OpndKind_Imm, OpndSize_64, RegName_Null }
+    #define imm64   {OpndKind_Imm, OpndSize_64, RegName_Null }
 #endif
 
+//FIXME: moff-s are in fact memory refs, but presented as immediate.
+// Need to specify this in OpndDesc.
+#define moff8        {OpndKind_Imm, OpndSize_32, RegName_Null}
+#define moff16       {OpndKind_Imm, OpndSize_32, RegName_Null}
+#define moff32       {OpndKind_Imm, OpndSize_32, RegName_Null}
+#ifdef _EM64T_
+    #define moff64       {OpndKind_Imm, OpndSize_64, RegName_Null}
+#endif
+
+
 #define rel8        {OpndKind_Imm, OpndSize_8, RegName_Null}
 #define rel16       {OpndKind_Imm, OpndSize_16, RegName_Null}
 #define rel32       {OpndKind_Imm, OpndSize_32, RegName_Null}
@@ -262,7 +272,20 @@
 * platform on which the opcode is applicable.
 */
 struct OpcodeInfo {
-    enum platform { all, em64t, ia32 };
+    enum platform {
+        /// an opcode is valid on all platforms
+        all,
+        // opcode is valid on IA-32 only
+        em64t,
+        // opcode is valid on Intel64 only
+        ia32,
+        // opcode is added for the sake of disassembling, should not be used in encoding
+        decoder,
+        // only appears in master table, replaced with 'decoder' in hashed version
+        decoder32,
+        // only appears in master table, replaced with 'decoder' in hashed version
+        decoder64,
+    };
     platform                        platf;
     unsigned                        opcode[4+1+1];
     EncoderBase::OpndDesc           opnds[3];
@@ -332,10 +355,10 @@
      * Array of opcodes.
      * The terminating opcode description always have OpcodeByteKind_LAST
      * at the opcodes[i].opcode[0].
-     * The size of '20' has nothing behind it, just counted the max 
-     * number of opcodes currently used.
+     * The size of '25' has nothing behind it, just counted the max
+     * number of opcodes currently used (MOV instruction).
      */
-    OpcodeInfo                              opcodes[20];
+    OpcodeInfo                              opcodes[25];
 };
 
 ENCODER_NAMESPACE_END

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp Wed Nov 21 08:29:40 2007
@@ -345,10 +345,10 @@
 
 #define DEFINE_ALU_OPCODES( opc_ext, opcode_starts_from, first_opcode, def_use ) \
 \
-/*  {OpcodeInfo::all,     {opcode_starts_from + 4, ib},           {AL,            imm8},  DU_U },\
-    {OpcodeInfo::all,     {opcode_starts_from + 5, iw},           {AX,            imm16}, DU_U },\
-    {OpcodeInfo::all,     {opcode_starts_from + 5, id},           {EAX,           imm32}, DU_U },\
-    {OpcodeInfo::em64t,   {REX_W, opcode_starts_from+5, id},              {RAX,           imm32}, DU_U },*/\
+    {OpcodeInfo::decoder,   {opcode_starts_from + 4, ib},           {AL,    imm8},  DU_U },\
+    {OpcodeInfo::decoder,   {Size16, opcode_starts_from + 5, iw},   {AX,    imm16}, DU_U },\
+    {OpcodeInfo::decoder,   {opcode_starts_from + 5, id},           {EAX,   imm32}, DU_U },\
+    {OpcodeInfo::decoder64, {REX_W, opcode_starts_from+5, id},      {RAX,   imm32}, DU_U },\
 \
     {OpcodeInfo::all,     {0x80, opc_ext, ib},          {r_m8,  imm8},  def_use },\
     {OpcodeInfo::all,     {Size16, 0x81, opc_ext, iw},  {r_m16, imm16}, def_use },\
@@ -995,9 +995,21 @@
     {OpcodeInfo::all,   {Size16, 0xC7, _0}, {r_m16,imm16},  D_U },
     {OpcodeInfo::all,   {0xC7, _0},         {r_m32,imm32},  D_U },
     {OpcodeInfo::em64t, {REX_W, 0xC7, _0},  {r_m64,imm32},  D_U },
+
+    {OpcodeInfo::decoder,   {0xA0},         {AL,  moff8},  D_U },
+    {OpcodeInfo::decoder,   {Size16, 0xA1}, {AX,  moff16},  D_U },
+    {OpcodeInfo::decoder,   {0xA1},         {EAX, moff32},  D_U },
+    //{OpcodeInfo::decoder64,   {REX_W, 0xA1},  {RAX, moff64},  D_U },
+
+    {OpcodeInfo::decoder,   {0xA2},         {moff8, AL},  D_U },
+    {OpcodeInfo::decoder,   {Size16, 0xA3}, {moff16, AX},  D_U },
+    {OpcodeInfo::decoder,   {0xA3},         {moff32, EAX},  D_U },
+    //{OpcodeInfo::decoder64,   {REX_W, 0xA3},  {moff64, RAX},  D_U },
 END_OPCODES()
 END_MNEMONIC()
 
+
+
 BEGIN_MNEMONIC(XCHG, MF_NONE, DU_DU )
 BEGIN_OPCODES()
     {OpcodeInfo::all,     {0x87, _r},   {r_m32,r32},    DU_DU },
@@ -1291,12 +1303,12 @@
 
 BEGIN_MNEMONIC(TEST, MF_AFFECTS_FLAGS, U_U)
 BEGIN_OPCODES()
-    /*
-    {OpcodeInfo::all,     {0xA8, ib},               { AL, imm8},    U_U },
-    {OpcodeInfo::all,     {0xA9, iw},               { AX, imm16},   U_U },
-    {OpcodeInfo::all,     {0xA9, id},               { EAX, imm32},  U_U },
-    {OpcodeInfo::em64t,   {REX_W, 0xA9, id},        { RAX, imm32},  U_U },
-    */
+
+    {OpcodeInfo::decoder,   {0xA8, ib},               { AL, imm8},    U_U },
+    {OpcodeInfo::decoder,   {0xA9, iw},               { AX, imm16},   U_U },
+    {OpcodeInfo::decoder,   {0xA9, id},               { EAX, imm32},  U_U },
+    {OpcodeInfo::decoder64, {REX_W, 0xA9, id},        { RAX, imm32},  U_U },
+
     {OpcodeInfo::all,   {0xF6, _0, ib},         {r_m8,imm8},   U_U },
 
     {OpcodeInfo::all,   {Size16, 0xF7, _0, iw}, {r_m16,imm16}, U_U },
@@ -1476,6 +1488,23 @@
 //
 // ~String operations
 //
+
+//
+//Note: the instructions below added for the sake of disassembling routine.
+// They need to have flags, params and params usage to be defined more precisely.
+//
+BEGIN_MNEMONIC(LEAVE, MF_NONE, N)
+BEGIN_OPCODES()
+    {OpcodeInfo::decoder,     {0xC9},         {},       N },
+END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(ENTER, MF_NONE, N)
+BEGIN_OPCODES()
+    {OpcodeInfo::decoder,     {0xC8, iw, ib},           {imm16, imm8},  N },
+END_OPCODES()
+END_MNEMONIC()
+
 };      // ~masterEncodingTable[]
 
 ENCODER_NAMESPACE_END
@@ -1536,9 +1565,18 @@
         odesc.last = 0;
 #ifdef _EM64T_
         if (oinfo.platf == OpcodeInfo::ia32) { continue; }
+        if (oinfo.platf == OpcodeInfo::decoder32) { continue; }
 #else
         if (oinfo.platf == OpcodeInfo::em64t) { continue; }
+        if (oinfo.platf == OpcodeInfo::decoder64) { continue; }
 #endif
+        if (oinfo.platf == OpcodeInfo::decoder64 ||
+            oinfo.platf == OpcodeInfo::decoder32) {
+             odesc.platf = OpcodeInfo::decoder;
+        }
+        else {
+            odesc.platf = (char)oinfo.platf;
+        }
         //
         // fill out opcodes
         //
@@ -1587,15 +1625,23 @@
         }
         // check imm
         if (oinfo.roles.count > 0 && 
-            oinfo.opnds[oinfo.roles.count-1].kind == OpndKind_Imm) {
-            // Example: CALL cd, PUSH imm32,
+            (oinfo.opnds[0].kind == OpndKind_Imm ||
+            oinfo.opnds[oinfo.roles.count-1].kind == OpndKind_Imm)) {
+            // Example: CALL cd, PUSH imm32 - they fit both opnds[0] and
+            // opnds[oinfo.roles.count-1].
+            // The A3 opcode fits only opnds[0] - it's currently have
+            // MOV imm32, EAX. Looks ridiculous, but this is how the
+            // moffset is currently implemented. Will need to fix together
+            // with other usages of moff.
             // adding fake /cd or fake /id
-            OpndSize sz = oinfo.opnds[oinfo.roles.count-1].size;
+            unsigned imm_opnd_index =
+                oinfo.opnds[0].kind == OpndKind_Imm ? 0 : oinfo.roles.count-1;
+            OpndSize sz = oinfo.opnds[imm_opnd_index].size;
             unsigned imm_encode, coff_encode;
             if (sz==OpndSize_8) {imm_encode = ib; coff_encode=cb; }
             else if (sz==OpndSize_16) {imm_encode = iw; coff_encode=cw;}
             else if (sz==OpndSize_32) {imm_encode = id; coff_encode=cd; }
-        else if (sz==OpndSize_64) {imm_encode = io; coff_encode=0xCC; }
+            else if (sz==OpndSize_64) {imm_encode = io; coff_encode=0xCC; }
             else { assert(false); imm_encode=0xCC; coff_encode=0xCC; }
             if (odesc.aux1 == 0) {
                 if (odesc.aux0==0) {
@@ -1622,6 +1668,12 @@
             if (odesc.opnds[1].reg != RegName_Null) {
                 ++odesc.first_opnd;
             }
+        }
+
+        if (odesc.platf == OpcodeInfo::decoder) {
+            // if the opcode is only for decoding info, then do not hash it.
+            ++oindex;
+            continue;
         }
        
         //

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/stack_iterator_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/stack_iterator_ia32.cpp?rev=597138&r1=597137&r2=597138&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/stack_iterator_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/stack_iterator_ia32.cpp Wed Nov 21 08:29:40 2007
@@ -255,7 +255,6 @@
 
 StackIterator* si_create_from_registers(Registers* regs, bool is_ip_past, M2nFrame* lm2nf)
 {
-    ASSERT_NO_INTERPRETER
     // Allocate iterator
     StackIterator* res = (StackIterator*)STD_MALLOC(sizeof(StackIterator));
     assert(res);

Added: harmony/enhanced/drlvm/trunk/vm/tests/ncai/README.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ncai/README.txt?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/ncai/README.txt (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/ncai/README.txt Wed Nov 21 08:29:40 2007
@@ -0,0 +1,20 @@
+The environmental variables must be set:
+
+
+   VTSSUITE_ROOT=... <place where suite was installed, ...vm/tests/ncai>
+   CLASSPATH=... <...vm/tests/ncai/bin/classes>
+   REF_JAVA_HOME=... <reference 1.5.0 java home>
+       On Linux, there is ref java in /nfs/ims/proj/drl/mrt/install/java/bea/jdk_1.5.0_06_x86/
+   TST_JAVA_HOME=... <tested java>
+
+start.sh [-o b|r|br] [-sin testname1 [testname2]...[testname...N] ]|
+         [-grp groupname]|[-all]
+
+   -o r  - run test(s) only (by default)
+   -o b  - build test(s) only
+   -o br - build and run tests
+
+if option "-o" is absent test(s) will run only.
+
+   -sin - after this option you can point one or several tests for selecting
+   -grp - only 1 test group is selected

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/ncai/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.cpp?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.cpp (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.cpp Wed Nov 21 08:29:40 2007
@@ -0,0 +1,147 @@
+/**
+ * @author Petr Ivanov
+ * @version $Revision: 1.1.1.1 $
+ *
+ */
+
+/* *********************************************************************** */
+
+#include "events.h"
+#include "utils.h"
+#include "ncai.h"
+
+#include <string.h>
+
+static bool test = false;
+static bool util = false;
+static bool flag = false;
+
+const char test_case_name[] = "GetAllModules01";
+
+/* *********************************************************************** */
+
+
+JNIEXPORT jint JNICALL Agent_OnLoad(prms_AGENT_ONLOAD)
+{
+    Callbacks CB;
+    check_AGENT_ONLOAD;
+    jvmtiEvent events[] = { JVMTI_EVENT_EXCEPTION, JVMTI_EVENT_VM_DEATH };
+    cb_exc;
+    cb_death;
+    return func_for_Agent_OnLoad(vm, options, reserved, &CB,
+        events, sizeof(events)/sizeof(jvmtiEvent), test_case_name, DEBUG_OUT);
+}
+
+/* *********************************************************************** */
+
+void JNICALL callbackException(prms_EXCPT)
+{
+    check_EXCPT;
+    if (flag) return;
+
+    /*
+     * Function separate all other exceptions in all other method
+     */
+    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
+                "special_method", DEBUG_OUT)) return;
+
+    flag = true;
+    util = true;
+
+    jvmtiError err;
+    ncaiError ncai_err;
+
+    jvmtiExtensionFunctionInfo* ext_info = NULL;
+    jint ext_count = 0;
+
+    err = jvmti_env->GetExtensionFunctions(&ext_count, &ext_info);
+
+    if (err != JVMTI_ERROR_NONE)
+    {
+        fprintf(stderr, "test_function: GetExtensionFunctions() returned error: %d, '%s'\n",
+            err, get_jvmti_eror_text(err));
+        test = false;
+        return;
+    }
+
+    if (ext_count == 0 || ext_info == NULL)
+    {
+        fprintf(stderr, "test_function: GetExtensionFunctions() returned no extensions\n");
+        test = false;
+        return;
+    }
+
+    jvmtiExtensionFunction get_ncai_func = NULL;
+
+    for (int i = 0; i < ext_count; i++)
+    {
+        if (strcmp(ext_info[i].id, "org.apache.harmony.vm.GetExtensionEnv") == 0)
+        {
+            get_ncai_func = ext_info[i].func;
+            break;
+        }
+    }
+
+    if (get_ncai_func == NULL)
+    {
+        fprintf(stderr, "test_function: GetNCAIEnvironment() nas not been found among JVMTI extensions\n");
+        test = false;
+        return;
+    }
+
+    ncaiEnv* ncai_env = NULL;
+
+    err = get_ncai_func(jvmti_env, &ncai_env, NCAI_VERSION_1_0);
+
+    if (err != JVMTI_ERROR_NONE)
+    {
+        fprintf(stderr, "test_function: get_ncai_func() returned error: %d, '%s'\n",
+            err, get_jvmti_eror_text(err));
+        test = false;
+        return;
+    }
+
+    if (ncai_env == NULL)
+    {
+        fprintf(stderr, "test_function: get_ncai_func() returned NULL environment\n");
+        test = false;
+        return;
+    }
+
+    printf("test_function: ncaiEnv obtained successfully\n");
+
+    ncaiModule* modules;
+    jint tcount = 0;
+    jint j = 0;
+
+    ncai_env->GetAllLoadedModules(&tcount, &modules);
+    fprintf(stderr, "MethodExit: GetAllLoadedModules(), count = %d\n", tcount);
+
+    bool ij_present = false;
+
+    for (j = 0; j < tcount; j++)
+    {
+        ncaiModuleInfo info;
+        ncai_err = ncai_env->GetModuleInfo(modules[j], &info);
+        if (ncai_err != NCAI_ERROR_NONE)
+        {
+            fprintf(stderr, "ncai_env->GetModuleInfo() returned error: %d, '%s'\n", ncai_err,
+                get_jvmti_eror_text(err));
+            test = false;
+            return;
+        }
+        fprintf(stderr, "info on module %d: name - %s, type - %d\n", j, info.name, info.kind);
+        if(strcmp(info.name,"java") == 0 && info.kind == NCAI_MODULE_VM_INTERNAL)
+            ij_present = true;
+    }
+
+    test = ij_present;
+}
+
+void JNICALL callbackVMDeath(prms_VMDEATH)
+{
+    check_VMDEATH;
+    func_for_callback_VMDeath(jni_env, jvmti_env, test_case_name, test, util);
+}
+
+/* *********************************************************************** */

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.java?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.java Wed Nov 21 08:29:40 2007
@@ -0,0 +1,26 @@
+package ncai.funcs;
+
+/**
+ * @author Petr Ivanov
+ * @version $Revision: 1.1.1.1 $
+ *
+ */
+public class GetAllModules01 {
+
+    static public void main(String args[]) {
+        special_method();
+        return;
+    }
+
+    static public void special_method() {
+        /*
+         * Transfer control to native part.
+         */
+        try {
+            throw new InterruptedException();
+        } catch (Throwable tex) { }
+        return;
+    }
+}
+
+

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01/GetAllModules01.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.cpp?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.cpp (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.cpp Wed Nov 21 08:29:40 2007
@@ -0,0 +1,132 @@
+/**
+ * @author Petr Ivanov
+ * @version $Revision: 1.1.1.1 $
+ *
+ */
+
+/* *********************************************************************** */
+
+#include "events.h"
+#include "utils.h"
+#include "ncai.h"
+
+#include <string.h>
+
+static bool test = false;
+static bool util = false;
+static bool flag = false;
+
+const char test_case_name[] = "GetAllModules01n";
+
+/* *********************************************************************** */
+
+
+JNIEXPORT jint JNICALL Agent_OnLoad(prms_AGENT_ONLOAD)
+{
+    Callbacks CB;
+    check_AGENT_ONLOAD;
+    jvmtiEvent events[] = { JVMTI_EVENT_EXCEPTION, JVMTI_EVENT_VM_DEATH };
+    cb_exc;
+    cb_death;
+    return func_for_Agent_OnLoad(vm, options, reserved, &CB,
+        events, sizeof(events)/sizeof(jvmtiEvent), test_case_name, DEBUG_OUT);
+}
+
+/* *********************************************************************** */
+
+void JNICALL callbackException(prms_EXCPT)
+{
+    check_EXCPT;
+    if (flag) return;
+
+    /*
+     * Function separate all other exceptions in all other method
+     */
+    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
+                "special_method", DEBUG_OUT)) return;
+
+    flag = true;
+    util = true;
+
+    jvmtiError err;
+    ncaiError ncai_err;
+
+    jvmtiExtensionFunctionInfo* ext_info = NULL;
+    jint ext_count = 0;
+
+    err = jvmti_env->GetExtensionFunctions(&ext_count, &ext_info);
+
+    if (err != JVMTI_ERROR_NONE)
+    {
+        fprintf(stderr, "test_function: GetExtensionFunctions() returned error: %d, '%s'\n",
+            err, get_jvmti_eror_text(err));
+        test = false;
+        return;
+    }
+
+    if (ext_count == 0 || ext_info == NULL)
+    {
+        fprintf(stderr, "test_function: GetExtensionFunctions() returned no extensions\n");
+        test = false;
+        return;
+    }
+
+    jvmtiExtensionFunction get_ncai_func = NULL;
+
+    for (int i = 0; i < ext_count; i++)
+    {
+        if (strcmp(ext_info[i].id, "org.apache.harmony.vm.GetExtensionEnv") == 0)
+        {
+            get_ncai_func = ext_info[i].func;
+            break;
+        }
+    }
+
+    if (get_ncai_func == NULL)
+    {
+        fprintf(stderr, "test_function: GetNCAIEnvironment() nas not been found among JVMTI extensions\n");
+        test = false;
+        return;
+    }
+
+    ncaiEnv* ncai_env = NULL;
+
+    err = get_ncai_func(jvmti_env, &ncai_env, NCAI_VERSION_1_0);
+
+    if (err != JVMTI_ERROR_NONE)
+    {
+        fprintf(stderr, "test_function: get_ncai_func() returned error: %d, '%s'\n",
+            err, get_jvmti_eror_text(err));
+        test = false;
+        return;
+    }
+
+    if (ncai_env == NULL)
+    {
+        fprintf(stderr, "test_function: get_ncai_func() returned NULL environment\n");
+        test = false;
+        return;
+    }
+
+    printf("test_function: ncaiEnv obtained successfully\n");
+
+    ncaiModule* modules;
+
+    ncai_err = ncai_env->GetAllLoadedModules(NULL, &modules);
+    if(ncai_err != NCAI_ERROR_NULL_POINTER)
+    {
+        fprintf(stderr, "test_function: GetAllLoadedModules() returned error: %d\n", ncai_err);
+        test = false;
+        return;
+    }
+
+    test = true;
+}
+
+void JNICALL callbackVMDeath(prms_VMDEATH)
+{
+    check_VMDEATH;
+    func_for_callback_VMDeath(jni_env, jvmti_env, test_case_name, test, util);
+}
+
+/* *********************************************************************** */

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.java?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.java Wed Nov 21 08:29:40 2007
@@ -0,0 +1,26 @@
+package ncai.funcs;
+
+/**
+ * @author Petr Ivanov
+ * @version $Revision: 1.1.1.1 $
+ *
+ */
+public class GetAllModules01n {
+
+    static public void main(String args[]) {
+        special_method();
+        return;
+    }
+
+    static public void special_method() {
+        /*
+         * Transfer control to native part.
+         */
+        try {
+            throw new InterruptedException();
+        } catch (Throwable tex) { }
+        return;
+    }
+}
+
+

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules01n/GetAllModules01n.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.cpp?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.cpp (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.cpp Wed Nov 21 08:29:40 2007
@@ -0,0 +1,149 @@
+/**
+ * @author Petr Ivanov
+ * @version $Revision: 1.1.1.1 $
+ *
+ */
+
+/* *********************************************************************** */
+
+#include "events.h"
+#include "utils.h"
+#include "ncai.h"
+
+static bool test = false;
+static bool util = false;
+static bool flag = false;
+
+const char test_case_name[] = "GetAllModules02";
+
+/* *********************************************************************** */
+
+
+JNIEXPORT jint JNICALL Agent_OnLoad(prms_AGENT_ONLOAD)
+{
+    Callbacks CB;
+    check_AGENT_ONLOAD;
+    jvmtiEvent events[] = { JVMTI_EVENT_EXCEPTION, JVMTI_EVENT_VM_DEATH };
+    cb_exc;
+    cb_death;
+    return func_for_Agent_OnLoad(vm, options, reserved, &CB,
+        events, sizeof(events)/sizeof(jvmtiEvent), test_case_name, DEBUG_OUT);
+}
+
+/* *********************************************************************** */
+
+void JNICALL callbackException(prms_EXCPT)
+{
+    check_EXCPT;
+    if (flag) return;
+
+    /*
+     * Function separate all other exceptions in all other method
+     */
+    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
+                "special_method", DEBUG_OUT)) return;
+
+    flag = true;
+    util = true;
+
+
+    jvmtiError err;
+    ncaiError ncai_err;
+
+    jvmtiExtensionFunctionInfo* ext_info = NULL;
+    jint ext_count = 0;
+
+    err = jvmti_env->GetExtensionFunctions(&ext_count, &ext_info);
+
+    if (err != JVMTI_ERROR_NONE)
+    {
+        fprintf(stderr, "test_function: GetExtensionFunctions() returned error: %d, '%s'\n",
+            err, get_jvmti_eror_text(err));
+        test = false;
+        return;
+    }
+
+    if (ext_count == 0 || ext_info == NULL)
+    {
+        fprintf(stderr, "test_function: GetExtensionFunctions() returned no extensions\n");
+        test = false;
+        return;
+    }
+
+    jvmtiExtensionFunction get_ncai_func = NULL;
+
+    for (int i = 0; i < ext_count; i++)
+    {
+        if (strcmp(ext_info[i].id, "org.apache.harmony.vm.GetExtensionEnv") == 0)
+        {
+            get_ncai_func = ext_info[i].func;
+            break;
+        }
+    }
+
+    if (get_ncai_func == NULL)
+    {
+        fprintf(stderr, "test_function: GetNCAIEnvironment() nas not been found among JVMTI extensions\n");
+        test = false;
+        return;
+    }
+
+    ncaiEnv* ncai_env = NULL;
+
+    err = get_ncai_func(jvmti_env, &ncai_env, NCAI_VERSION_1_0);
+
+    if (err != JVMTI_ERROR_NONE)
+    {
+        fprintf(stderr, "test_function: get_ncai_func() returned error: %d, '%s'\n",
+            err, get_jvmti_eror_text(err));
+        test = false;
+        return;
+    }
+
+    if (ncai_env == NULL)
+    {
+        fprintf(stderr, "test_function: get_ncai_func() returned NULL environment\n");
+        test = false;
+        return;
+    }
+
+    printf("test_function: ncaiEnv obtained successfully\n");
+
+    ncaiModule* modules;
+    jint tcount = 0;
+    jint j = 0;
+
+    ncai_env->GetAllLoadedModules(&tcount, &modules);
+    fprintf(stderr, "MethodExit: GetAllLoadedModules(), count = %d\n", tcount);
+
+    bool agent_present = false;
+
+    for (j = 0; j < tcount; j++)
+    {
+        ncaiModuleInfo info;
+        ncai_err = ncai_env->GetModuleInfo(modules[j], &info);
+        if (ncai_err != NCAI_ERROR_NONE)
+        {
+            fprintf(stderr, "ncai_env->GetModuleInfo() returned error: %d, '%s'\n", ncai_err,
+                get_jvmti_eror_text(err));
+            test = false;
+            return;
+        }
+        fprintf(stderr, "info on module %d: name - %s, type - %d\n", j, info.name, info.kind);
+
+        if((strcmp(info.name,"GetAllModules02") == 0
+            || strcmp(info.name,"getallmodules02") == 0)
+            && info.kind == NCAI_MODULE_OTHER)
+            agent_present = true;
+    }
+
+    test = agent_present;
+}
+
+void JNICALL callbackVMDeath(prms_VMDEATH)
+{
+    check_VMDEATH;
+    func_for_callback_VMDeath(jni_env, jvmti_env, test_case_name, test, util);
+}
+
+/* *********************************************************************** */

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.java?rev=597138&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.java Wed Nov 21 08:29:40 2007
@@ -0,0 +1,26 @@
+package ncai.funcs;
+
+/**
+ * @author Petr Ivanov
+ * @version $Revision: 1.1.1.1 $
+ *
+ */
+public class GetAllModules02 {
+
+    static public void main(String args[]) {
+        special_method();
+        return;
+    }
+
+    static public void special_method() {
+        /*
+         * Transfer control to native part.
+         */
+        try {
+            throw new InterruptedException();
+        } catch (Throwable tex) { }
+        return;
+    }
+}
+
+

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/ncai/funcs/GetAllModules/GetAllModules02/GetAllModules02.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message