From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18493 invoked by alias); 25 Dec 2013 15:32:48 -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 18482 invoked by uid 89); 25 Dec 2013 15:32:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-SHA encrypted) ESMTPS; Wed, 25 Dec 2013 15:32:45 +0000 Received: from [192.168.0.77] (port=33862 helo=dooku.mircat.net) by mircat.net with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.77) (envelope-from ) id 1VvqRr-000Dpy-8X; Wed, 25 Dec 2013 19:32:39 +0400 Message-ID: <52BAFA96.8060407@samersoff.net> Date: Wed, 25 Dec 2013 15:32:00 -0000 From: Dmitry Samersoff User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Joel Brobecker CC: Hui Zhu , "gdb@sourceware.org" , abhijit.k.halder@gmail.com Subject: Re: How to write native (i.e. C/C++) plugin for gdb? References: <52B97EB4.9070100@samersoff.net> <52B9966B.8050104@samersoff.net> <20131224144704.GJ4558@adacore.com> In-Reply-To: <20131224144704.GJ4558@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00079.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Joel, Thank you for the response. I found this patch https://sourceware.org/ml/gdb-patches/2012-05/msg00500.html - many thanks to Abhijit. 1. What is the reason to keep it off main trunk? Is there a chance to have it changed? 2. What API is available from within a plugin? i.e. how I can access coredump memory? - -Dmitry On 2013-12-24 18:47, Joel Brobecker wrote: >> I need to implement scenario like one below: >> >> (gdb) load-plugin libgdbjvm.so (gdb) attach PID (gdb) jvm show >> loaded-classes (gdb) jvm show java-threads (gdb) jvm show >> code-cache > > Maybe you could add some routines in your program that are solely > intended for debugging purposes, and then define commands that call > those routines. Off hand, that's the only way I can think of. > Otherwise, interface the C++ stuff you need from Python - if > necessary, export some stuff to C? > - -- Dmitry Samersoff Saint Petersburg, Russia, http://devnull.samersoff.net * There will come soft rains ... -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSuvqWAAoJEHEy08c4gIABMUQH/AiXTuX8BWuzG+Vm19EOSHlb 2EuBEpo633nBTgUlKIj99ePfuh5jRwZ5R0/pBmM/Ue4ytCJWTu0iQl5OU3RQ81BT U9lFccSUW9oBnrfCqAZWQLss2sX1eL+9JjCduu47rKa4mLMaiJ0kxRml7IAT42Lo h9j2QZSBcmEd5nA0VITU1meeIoU+KPhVe/UpNu1e3g/0EBgTnZbZ6iBbzqh+QhiY lzR4g3KtNpI7mz4DvJ8O7+xNbSeh5sU2zWWG/EbETQHkp/Xt/AbChnSY5udFe1oS lT87bTgh3cqWnTJVWa6UMI98K+RwIFVvxNQ3pIkuFFUh7HwEo+ubJL5xQT0Pn8Y= =Ql5e -----END PGP SIGNATURE-----