From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21030 invoked by alias); 8 May 2012 14:47:31 -0000 Received: (qmail 21022 invoked by uid 22791); 8 May 2012 14:47:29 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausxipps301.us.dell.com (HELO ausxipps301.us.dell.com) (143.166.148.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 May 2012 14:47:15 +0000 X-Loopcount0: from 10.175.216.250 From: To: CC: , , , Subject: Re: GDB plugin Date: Tue, 08 May 2012 14:47:00 -0000 Message-ID: <132323B5-DF29-48D0-BAD2-A1F53D4EE846@dell.com> References: <87vck7wxs7.fsf@fleche.redhat.com> In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00230.txt.bz2 On May 8, 2012, at 10:38 AM, Matt Rice wrote: > On 5/7/12, Hui Zhu wrote: >> On Tue, May 8, 2012 at 4:18 AM, Tom Tromey wrote: >>>>>>>> "Abhijit" =3D=3D Abhijit Halder write= s: >>>=20 >>> Abhijit> Is there any way to load a GDB plugin (shared library having >>> extended >>> Abhijit> functionality) in current GDB? I am planning to develop one. >>> Need >>> Abhijit> yours opinion on this. >>>=20 >>> There is a little bit of this for the JIT functionality. >>>=20 >>> Generic plugins are trouble because they tend to fix the API -- but we >>> want to be able to change the API as needed. The JIT approach avoided >>> this by exporting a custom, minimal API. >>>=20 >>> What exactly are you planning to do? >>>=20 >>> Tom >>=20 >> I think the api is not a big trouble, the Linux kernel's api is always >> change. But lkm is still alive. I use some ifdef to make KGTP can be >> work from 2.6.18 to upstream. I think if GDB can supply some >> interface to get the api version, support different api is not very >> hard. >=20 > all but a few of the kernel modules are actually shipped with the kernel = though. > nor does the kernel have a python interpreter embedded in it. I'm confused. GDB is not a kernel component, so a GDB plugin isn't a kerne= l module. How did lkm get brought into the discussion? Extending GDB can done in a number of ways, but the Python way is quite fle= xible and easy when the things you need are available in its API. And if t= hey aren't, they can be added. paul