From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27011 invoked by alias); 21 Oct 2012 23:35:48 -0000 Received: (qmail 26853 invoked by uid 22791); 21 Oct 2012 23:35:48 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wi0-f169.google.com (HELO mail-wi0-f169.google.com) (209.85.212.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 21 Oct 2012 23:35:42 +0000 Received: by mail-wi0-f169.google.com with SMTP id hq4so1578973wib.0 for ; Sun, 21 Oct 2012 16:35:41 -0700 (PDT) Received: by 10.180.94.102 with SMTP id db6mr16994145wib.20.1350862541712; Sun, 21 Oct 2012 16:35:41 -0700 (PDT) Received: from [192.168.10.2] (adsl-99-175-100-73.dsl.pltn13.sbcglobal.net. [99.175.100.73]) by mx.google.com with ESMTPS id v3sm18688080wiy.5.2012.10.21.16.35.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Oct 2012 16:35:40 -0700 (PDT) Message-ID: <508486C7.4080505@gmail.com> Date: Sun, 21 Oct 2012 23:35:00 -0000 From: Bruce Korb User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 MIME-Version: 1.0 To: Abhijit Halder , gdb@sourceware.org Subject: custom runtime GDB extensions Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00091.txt.bz2 Hi, I don't know exactly why the dlopen of shared objects is disparaged, because I couldn't find references via Googling. Anyway, my desire was to augment GDB with code derived from compiled C code that converts back and forth between bit masks and bit names. I didn't want to convert C to Python and I didn't want to maintain separate Python code by hand. So, I wanted wrapper code that could implement GDB extensions. I did find references to, "so we don't want C code, so we'll do it in Python", but no references to the rationale. So, anyway, thank you, Abhijit. I've successfully applied your patch. Now to my main point: why not use shared libraries? I'm working on an open source project that uses many, many bit maps and it would be convenient to be able to read the bitmaps without having to refer to header files with series of definitions like: #define MUMBLE 0x8000000000000000000ULL