From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7553 invoked by alias); 23 Oct 2012 20:01:49 -0000 Received: (qmail 7545 invoked by uid 22791); 23 Oct 2012 20:01:49 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-oa0-f41.google.com (HELO mail-oa0-f41.google.com) (209.85.219.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Oct 2012 20:01:43 +0000 Received: by mail-oa0-f41.google.com with SMTP id k14so4633917oag.0 for ; Tue, 23 Oct 2012 13:01:42 -0700 (PDT) Received: by 10.182.150.34 with SMTP id uf2mr11138156obb.66.1351022502551; Tue, 23 Oct 2012 13:01:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.69.39 with HTTP; Tue, 23 Oct 2012 13:01:22 -0700 (PDT) In-Reply-To: <20121023194943.GE3571@adacore.com> References: <508486C7.4080505@gmail.com> <87pq4agr0t.fsf@fleche.redhat.com> <87wqyhdmxq.fsf@fleche.redhat.com> <20121023194943.GE3571@adacore.com> From: Bruce Korb Date: Tue, 23 Oct 2012 20:01:00 -0000 Message-ID: Subject: Re: custom runtime GDB extensions To: Joel Brobecker Cc: Tom Tromey , Abhijit Halder , gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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-10/txt/msg00098.txt.bz2 On Tue, Oct 23, 2012 at 12:49 PM, Joel Brobecker wrote: >> A pointer to a cook book would be really helpful. Thank you so much! > > My point of view of a "cookbook" solution to extending GDB would be to > use the Python extension interface. It does depend on having a GDB that > includes Python support, but python suppport has been around for a while, > now, so I do not think it is an unreasonable assumption. OK, I do not speak Python. I have a library of C code that does what I need. Since no distribution I regularly use regularly enables python extensions for GDB, I will, therefore, need to rebuild GDB with python enabled and I need to find how to code up python-into-shared-library calls. Likely also how to load said shared library. That is a lot of work just for a GDB-into-object-code glue layer. I'll do it, but please help me with a short cut that does not entail the deep recesses of Python for dlopen-ing and calling into shared libraries. An example would do very nicely. I have googled for this and the lack of results has me here. Again, please and thank you! :) Regards, Bruce