From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5276 invoked by alias); 17 Sep 2002 22:45:03 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5261 invoked from network); 17 Sep 2002 22:45:01 -0000 Received: from unknown (HELO dmfet) (192.35.232.241) by sources.redhat.com with SMTP; 17 Sep 2002 22:45:01 -0000 Received: from smoser (helo=localhost) by dmfet with local-esmtp (Exim 3.35 #1 (Debian)) id 17rR5U-0005GK-00 for ; Tue, 17 Sep 2002 17:44:56 -0500 Date: Tue, 17 Sep 2002 15:45:00 -0000 From: Scott Moser X-X-Sender: smoser@dmfet To: gdb@sources.redhat.com Subject: GDB plugins/extensions with libGDB.so Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-09/txt/msg00245.txt.bz2 Hello all, A while ago I sent a mail to the list about GDB and plugins (http://sources.redhat.com/ml/gdb/2002-04/msg00371.html). I've got a patch that allows something very similar to what I described. However, the functionality as it stands only works on linux or other systems that allow dlsym()ing back into the main executable (as long as you compile with -rdynamic, which gdb already does). I tested also on freebsd, but I know it doesn't work on windows, and I'd guess isn't very cross platform in general. I can submit it if someone is interested. Relying on such rare behavior probably isn't a good idea for gdb, but I think that extensions/plugins are a good idea. In my personal experience I've come across a couple people that expressed interest in such functionality and saw other interest on the list (http://sources.redhat.com/ml/gdb/2002-05/msg00260.html). I think the best way to go about allowing extensions of GDB is to go the libgdb route. Basically /usr/bin/gdb would just be a the executable which gets most/all its functionality out of /usr/lib/libGDB.so, which extensions could then call back into in a very cross platform manner with dlopen and dlsym. I've successfully hand-built on linux in this manner to make sure it worked, but don't have a full scale build process together. To do this well, I think the best method would be to finish the TODO item and Automake-ify the gdb process and get libGDB.so built with libtool. I've taken a look at this a bit, but not being very familiar with the autotools, its not going too fast. (Is anyone else working on this? ) I could be either making this much too complicated, or not complicated enough. If I'm doing either, please let me know. What do people think about jump-starting the libGDB idea and getting "plugin" support into GDB all at once? Scott Moser Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-1533 T/L: 678-1533 ssmoser@us.ibm.com , internal zip: 9812