From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21015 invoked by alias); 24 Jan 2002 13:23:31 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20931 invoked from network); 24 Jan 2002 13:23:17 -0000 Received: from unknown (HELO bortas.appeal.se) (195.22.77.29) by sources.redhat.com with SMTP; 24 Jan 2002 13:23:17 -0000 Received: from appeal.se (barbara.appeal.se [192.168.1.70]) by bortas.appeal.se (8.11.0/8.11.0) with ESMTP id g0ODNGu11378 for ; Thu, 24 Jan 2002 14:23:16 +0100 Message-ID: <3C500AAC.5030709@appeal.se> Date: Thu, 24 Jan 2002 05:23:00 -0000 From: Johan Walles User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120 X-Accept-Language: sv, en-us MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Trouble debugging a Java Virtual Machine on Linux Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00282.txt.bz2 Hi! We are having trouble debugging our Java Virtual Machine on Linux. The reason is that: JRockit (our virtual machine) uses ptrace() for controlling threads. Gdb uses ptrace() for controlling processes / threads. Linux does not allow two processes (like both gdb and JRockit) at a time to ptrace() one target process (in our case, a Java thread). Thus, as both gdb and JRockit tries to PTRACE_ATTACH, they clash. We have discussed a number of solutions to this problem, and we are currently leaning towards making some sort of (non-JRockit specific) modifications to gdb so that a debuggee can provide alternative ways for gdb to manage processes. Now, I'd like very much to get some input from somebody knowledgable about gdb. First, is there already some simple way of interfacing with gdb to tell it to use our functions for managing processes and not its own? If not, does patching gdb seem like a reasonable solution? What would have to happen for these patches to get accepted into the official gdb? Regards, Johan Walles, Appeal Virtual Machines