Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2005 16:02:56 -0500
From:      Neo Jia <cjia@cse.unl.edu>
To:        Greg Lewis <glewis@eyesbeyond.com>
Cc:        freebsd-amd64@freebsd.org, freebsd-java@freebsd.org
Subject:   Re: Is there anyone using gdb to debug the JDK15?
Message-ID:  <1122066176.10951.23.camel@localhost.localdomain>
In-Reply-To: <20050626042355.GA41119@misty.eyesbeyond.com>
References:  <42BC8310.9040501@cse.unl.edu> <20050626042355.GA41119@misty.eyesbeyond.com>

next in thread | previous in thread | raw e-mail | index | archive | help
All,

I have successfully built the JDK15 on the top of Fedora Core 3 with AMD
64 SMP. But when I am going to use gdb debug the java_g, the gdb crashed
and reported some generic error messages. I attached the error messages
following. Is it a common problem created in AMD 64 arch? I saw the
program when it is going to invoke the execve() call.

Is it related to the omit-frame-pointer? Gdb seems cannot work properly
with such option on 64-bit.

> gdb $JAVA_ROOT/java_g
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-unknown-linux-gnu"...Using host
libthread_db library "/lib64/tls/libthread_db.so.1".

(gdb) b java_md.c:562
Breakpoint 1 at 0x4051ee: file ../../../../src/solaris/bin/java_md.c,
line 562.
(gdb) run -classpath . helloworld
Starting program: /home/cjia/j2sdk1.5.0-build/control/build/linux-
amd64/bin/java_g -classpath . helloworld
[Thread debugging using libthread_db enabled]
[New Thread 182894208224 (LWP 1893)]
[Switching to Thread 182894208224 (LWP 1893)]

Breakpoint 1, CreateExecutionEnvironment (_argcp=0x7fbffff4fc,
_argvp=0x7fbffff4f0, 
    jrepath=0x7fbfffe470 "/home/cjia/j2sdk1.5.0-
build/control/build/linux-amd64", 
    so_jrepath=4096, 
    jvmpath=0x5130f0 "/home/cjia/j2sdk1.5.0-build/control/build/linux-
amd64/lib/amd64/server", so_jvmpath=4096, original_argv=0x513010)
at ../../../../src/solaris/bin/java_md.c:562
562             execve(newexec, argv, newenvp);
(gdb) n
thread_get_info_callback: cannot get thread info: generic error
(gdb) n
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
(gdb) where
#0  0x0000000000401850 in ?? ()
#1  0x0000000000405205 in CreateExecutionEnvironment (_argcp=Cannot
fetch general-purpose registers for thread 182894208224: generic error
)
    at ../../../../src/solaris/bin/java_md.c:562
#2  0x0000000000000000 in ?? ()
#3  0x0000000000000000 in ?? ()
#4  0x0000000000000000 in ?? ()
#5  0x0000000000000000 in ?? ()
#6  0x0000000000000000 in ?? ()
#7  0x0000000000000000 in ?? ()
#8  0x0000000000000000 in ?? ()
#9  0x0000000000000000 in ?? ()
#10 0x0000000000000000 in ?? ()
#11 0x0000000000000000 in ?? ()
#12 0x0000000000000000 in ?? ()
#13 0x0000000000000000 in ?? ()
#14 0x0000000000000000 in ?? ()
#15 0x0000000000000000 in ?? ()
#16 0x0000000000000000 in ?? ()
#17 0x0000000000000000 in ?? ()
#18 0x0000000000000000 in ?? ()
#19 0x0000000000000000 in ?? ()
#20 0x0000000000000000 in ?? ()
#21 0x0000000000000000 in ?? ()
#22 0x0000000000000000 in ?? ()
#23 0x0000000000000000 in ?? ()
#24 0x0000000000000000 in ?? ()
#25 0x0000000000000000 in ?? ()
#26 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
#27 0x0000000000000000 in ?? ()
#28 0x0000000000000000 in ?? ()
#29 0x0000000000000000 in ?? ()
#30 0x0000000000000000 in ?? ()
#31 0x0000000000000000 in ?? ()
#32 0x0000000000000000 in ?? ()
#33 0x0000000000000000 in ?? ()
#34 0x0000000000000000 in ?? ()
#35 0x0000000000000000 in ?? ()
#36 0x0000000000000000 in ?? ()
#37 0x0000000000000000 in ?? ()
#38 0x0000000000000000 in ?? ()
#39 0x0000000000000000 in ?? ()
#40 0x0000000000000000 in ?? ()
#41 0x0000000000000000 in ?? ()
#42 0x0000000000000000 in ?? ()
#43 0x0000000000000000 in ?? ()
#44 0x0000000000000000 in ?? ()
#45 0x0000000000000000 in ?? ()
#46 0x0000000000000000 in ?? ()
#47 0x0000000000000000 in ?? ()
#48 0x0000000000000000 in ?? ()
#49 0x0000000000000000 in ?? ()
#50 0x0000000000000000 in ?? ()
#51 0x0000000000000000 in ?? ()
#52 0x0000000000000000 in ?? ()
#53 0x0000000000000000 in ?? ()
#54 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
#55 0x0000000000000000 in ?? ()
#56 0x0000000000000000 in ?? ()
#57 0x0000000000000000 in ?? ()
#58 0x0000000000000000 in ?? ()
#59 0x0000000000000000 in ?? ()
#60 0x0000000000000000 in ?? ()
#61 0x0000000000000000 in ?? ()
#62 0x0000000000000000 in ?? ()
#63 0x0000000000000000 in ?? ()
#64 0x0000000000000000 in ?? ()
#65 0x0000000000000000 in ?? ()
#66 0x0000000000000000 in ?? ()
#67 0x0000000000000000 in ?? ()
#68 0x0000000000000000 in ?? ()
#69 0x0000000000000000 in ?? ()
#70 0x0000000000000000 in ?? ()
#71 0x0000000000000000 in ?? ()
#72 0x0000000000000000 in ?? ()
#73 0x0000000000000000 in ?? ()
#74 0x0000000000000000 in ?? ()
#75 0x0000000000000000 in ?? ()
#76 0x0000000000000000 in ?? ()
#77 0x0000000000000000 in ?? ()
#78 0x0000000000000000 in ?? ()
#79 0x0000000000000000 in ?? ()
#80 0x0000000000000000 in ?? ()
#81 0x0000000000000000 in ?? ()
#82 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---qq
Quit
(gdb) exit
Undefined command: "exit".  Try "help".
(gdb) quit
The program is running.  Exit anyway? (y or n) y
Quitting: thread_db_get_info: cannot get thread info: generic error


Thanks,
Neo


On Sat, 2005-06-25 at 22:23 -0600, Greg Lewis wrote:

> On Fri, Jun 24, 2005 at 05:02:56PM -0500, Neo Jia wrote:
> > These days, I tried to build the JDK15 on AMD64 with Fedora Core 3, but 
> > failed. And I happened to find out that in these two mailing lists, 
> > there were many  people who had successfully built it with FreeBSD. I 
> > hope I could get some detailed information about the building procedure. 
> > Do you also use the source code from SUN SCSL or another version 
> > maintained by FreeBSD.org? What is the requirement I should meet to 
> > build it on FreeBSD, such as the version of FreeBSD? Do I still need GCC 
> > 3.2.2?
> > 
> > Sorry about so many questions at the first time. Your instructions will 
> > be greatly appreciated!
> 
> We use the Sun SCSL source code as the base for our port.  However, many
> patches are required for it to build on FreeBSD.  These are contained in
> a patchset that you can download at
> 
> http://www.eyesbeyond.com/freebsddom/java/jdk15.html
> 
> The easiest way to do this is simply to use the jdk15 port.  Simply do the
> following:
> 
> cd /usr/ports/java/jdk15
> make install
> 
> and follow the instructions.  There is one caveat on amd64 -- one of the
> build commands will fail strangely (this is a bug in the Linux emulation
> on amd64 as far as I can determine).  Simply execute that command by hand
> and restart the build.  Also, if you have an EM64T rather than an actual
> amd64 then you will need one patch (just reply to me and I can send it to
> you or search the mailing list archives and you should find it).
> 

-----------------------------------------------------------------------------------
I would remember that if researchers were not ambitions
probably today we haven't the technology we are using!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1122066176.10951.23.camel>