Xun, in my understranding, the cmain.c has the exact main trance to Harmony: main(). It's the launcher program to start the virtual machine module. Harmony launcher can start user-specified JVM if command line option is provided or the current default one: DRLVM.
Just following main() you will find DRLVM will be launched. If you don't care about the launcher, you can set breakpoint in the position you are interested in, such as vm_init1() that initializes DRLVM. Thanks, xiaofeng On 10/26/07, Zhou. Xun <[EMAIL PROTECTED]> wrote: > I was debugging the jre/bin/java of Harmony using gdb, > I made a break point at main(); > But when I run this program, gdb told me a new thread was created, then it > swith to this thread and stopped at the first line of main(); > I was wondering what does this thread came from? and what does it do before > main()? > The console is like this > > (gdb) file java > Reading symbols from /home/zhouxun/hdk/jdk/jre/bin/java...done. > Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". > (gdb) b main > Breakpoint 1 at 0x804b62e: file ../shared/cmain.c, line 102. > (gdb) r Hello > Starting program: /home/zhouxun/hdk/jdk/jre/bin/java Hello > [Thread debugging using libthread_db enabled] > [New Thread -1213589808 (LWP 7100)] > [Switching to Thread -1213589808 (LWP 7100)] > > Breakpoint 1, main (argc=2, argv=0xbfc88004, envp=0xbfc88010) at > ../shared/cmain.c:102 > 102 int rc = 257; > (gdb) > > -- > From: ZhouXun, Software School of Fudan University > -- http://xiao-feng.blogspot.com
