From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22638 invoked by alias); 9 Feb 2012 21:15:49 -0000 Received: (qmail 22629 invoked by uid 22791); 9 Feb 2012 21:15:48 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mailrelay007.isp.belgacom.be (HELO mailrelay007.isp.belgacom.be) (195.238.6.173) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Feb 2012 21:15:35 +0000 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAHc2NE/ZiFMa/2dsb2JhbAAMN4UPrUYBAQEEI1YQCw4KAgImAgJXBhOvHJImgS+KVR8BBgcCEwQBBgQDBwEBJYZmgRYEqBM Received: from 26.83-136-217.adsl-dyn.isp.belgacom.be (HELO [192.168.1.3]) ([217.136.83.26]) by relay.skynet.be with ESMTP; 09 Feb 2012 22:15:33 +0100 Subject: Re: GDB and the OpenJDK JVM From: Philippe Waroquiers To: Daniel Jacobowitz Cc: gdb@sourceware.org In-Reply-To: References: <20120209161612.GA7088@redhat.com> <1328818882.2213.9.camel@soleil> Content-Type: text/plain; charset="UTF-8" Date: Thu, 09 Feb 2012 21:15:00 -0000 Message-ID: <1328822151.2294.12.camel@soleil> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00029.txt.bz2 On Thu, 2012-02-09 at 15:47 -0500, Daniel Jacobowitz wrote: > On Thu, Feb 9, 2012 at 3:21 PM, Philippe Waroquiers > wrote: > > On google, the keywords 'java debugger interface' points at some > > "standardised" documents (including a "wire protocol") aiming at > > connecting a debugger to a JVM. > > That's something completely different - how to talk to the JVM for > bytecode or source level debugging of the code running on the VM. I'm > talking about debugging the underlying JVM in order to debug native > code such as JNI. > > Now, it might be possible to simultaneously control the VM using > ptrace and let enough of it free-run to speak JDWP to it. It would be > a bit of a trick, though... I wouldn't even raise the idea if non-stop > weren't so far along. > I am not sure I fully understand the difference between bytecode debugging/source level debugging of the code running on the VM and e.g. >> * Showing information about Java objects given JNI handles >> * Interleaving Java frames in the stack trace >> * Fabricating unwind information for JIT'd code You might also take a look at a recent version of hp wdb (hp modified gdb). IIUC, it has some support for mixed Java and other lang debugging. E.g. here is an extract of the manual: "Using WDB to examine backtraces in JavaTM thread stacks You can now use HP's debugger WDB 3.0.01 or later (the GNU Debugger GDB) to examine backtraces containing mixed language frames (JavaTM and C/C++) in JavaTM thread stacks. This will simplify debugging the VM and JavaTM mixed-language applications. Set the environment variable GDB_JAVA_UNWINDLIB to the path name of the JavaTM Unwind Shared Library libjunwind, which is in the JDK." (sorry if I point again at useless info due to my misunderstanding of your objectives). Philippe