From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121409 invoked by alias); 27 Feb 2019 07:59:44 -0000 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 Received: (qmail 120790 invoked by uid 89); 27 Feb 2019 07:59:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy= X-HELO: mircat.net Received: from mircat.net (HELO mircat.net) (81.9.105.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Feb 2019 07:59:42 +0000 Received: from [84.47.189.78] (port=20287 helo=[172.27.105.179]) by mircat.net with esmtpsa (TLSv1.2:AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1gyu7u-0002uR-6m; Wed, 27 Feb 2019 10:59:38 +0300 Subject: Re: Is nexti confused by pushq? To: Tom Tromey , David Griffiths Cc: Jan Kratochvil , Andrew Burgess , dwk , GDB References: <20190226073236.GD10887@embecosm.com> <20190226101245.GA1496753@host1.jankratochvil.net> <87h8cqfk0k.fsf@tromey.com> From: Dmitry Samersoff Openpgp: preference=signencrypt Message-ID: Date: Wed, 27 Feb 2019 07:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <87h8cqfk0k.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: dms@mircat.net X-Authenticated-As: dms X-SpamProbe: GOOD 0.0000038 c0c3f8a4e798f169c3050a9442cba868 X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00073.txt.bz2 Tom, > for the JIT you'd want to do something similar. I thought there was > already such an unwinder for OpenJDK at least... ? Yes, JDK has different kind of unwinders but unfortunately porting it to python is problematic. It reminds me old discussion about a native plugin interface for gdb -Dmitry On 26.02.2019 22:05, Tom Tromey wrote: >>>>>> "David" == David Griffiths writes: > > David> Ok, so in my case this is generated code with no debug info (Java JIT > David> generated) so does that mean I shouldn't attempt to use nexti? (I've got > David> other issues which probably preclude using nexti anyway but just curious) > > There are a few options to deal with this sort of problem. > > As Jan said, the JIT could generate debug info using one of the > gdb-provided JIT interfaces. That's kind of heavyweight but gives a lot > of control. > > Another option is to write an unwinder in Python. The crucial thing > here is to ensure that the frame ID is constant for the duration of a > frame. In DWARF this is done by using the CFA as part of the identity; > for the JIT you'd want to do something similar. I thought there was > already such an unwinder for OpenJDK at least... ? > > Tom >