From owner-freebsd-amd64@FreeBSD.ORG Fri Jul 22 21:20:14 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A9E716A422; Fri, 22 Jul 2005 21:20:14 +0000 (GMT) (envelope-from cjia@cse.unl.edu) Received: from cse-mail.unl.edu (cse-mail.unl.edu [129.93.165.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 093E9441C1; Fri, 22 Jul 2005 21:05:59 +0000 (GMT) (envelope-from cjia@cse.unl.edu) Received: from cse-witty-81.unl.edu (cse-witty-81.unl.edu [129.93.165.9]) by cse-mail.unl.edu (8.13.1/8.13.1) with ESMTP id j6ML5b3h026155; Fri, 22 Jul 2005 16:05:38 -0500 (CDT) From: Neo Jia To: Greg Lewis In-Reply-To: <20050626042355.GA41119@misty.eyesbeyond.com> References: <42BC8310.9040501@cse.unl.edu> <20050626042355.GA41119@misty.eyesbeyond.com> Date: Fri, 22 Jul 2005 16:02:56 -0500 Message-Id: <1122066176.10951.23.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) X-Scanned-By: MIMEDefang 2.49 on 129.93.165.11 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-amd64@freebsd.org, freebsd-java@freebsd.org Subject: Re: Is there anyone using gdb to debug the JDK15? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2005 21:20:14 -0000 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 to continue, or q 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 to continue, or q 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 to continue, or q 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!