From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4874 invoked by alias); 16 Oct 2014 13:54:16 -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 4809 invoked by uid 89); 16 Oct 2014 13:54:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 16 Oct 2014 13:54:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A84FC116327; Thu, 16 Oct 2014 09:54:12 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0UEygHU4uKzR; Thu, 16 Oct 2014 09:54:12 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 754B1116326; Thu, 16 Oct 2014 09:54:12 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 9BBAD40DC2; Thu, 16 Oct 2014 06:54:13 -0700 (PDT) Date: Thu, 16 Oct 2014 13:54:00 -0000 From: Joel Brobecker To: Phil Muldoon Cc: =?utf-8?Q?=C3=96mer_Sinan_A=C4=9Facan?= , gdb Subject: Re: GDB C API -- does such a thing exist? Message-ID: <20141016135413.GM4805@adacore.com> References: <543FBFCE.4030305@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <543FBFCE.4030305@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-10/txt/msg00038.txt.bz2 > No. Well let me qualify. There is a libgdb, but I have never used it > and I am not sure anyone has for some many years. I am not sure how > maintained it is either. Someone else might know more. I don't think there is a libgdb anymore. IIRC, Jan eliminated it, because it was increasing the amount of time needed to be linked (first generate the .a, next build using the .a). > A direct C API, aka what we have with Python, while nice, is not > likely any time soon. We cannot just expose all of the innards of GDB > automatically, say with some script, to a C API. GDB internals were > never designed to be exposed in such a way. The API would have to be > a curated API and I don't see anyone working on that goal at present. > > If you are determined to go the C route, IMO your best bet would be to > modify GDB directly to your needs and rebuild. GDB is fairly trivial > to build. Less so to modify, but those are your options at the > moment. ;) Be aware that there is no stability guaranteed in our C API. Maybe lldb might provide better guarantees in that respect. I would personally look at either Python or GDB/MI first. -- Joel