From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24161 invoked by alias); 30 Aug 2011 18:52:25 -0000 Received: (qmail 24147 invoked by uid 22791); 30 Aug 2011 18:52:25 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Aug 2011 18:52:09 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7UIq8ZD015210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Aug 2011 14:52:08 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7UIq7nK008339; Tue, 30 Aug 2011 14:52:07 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p7UIq6Ak032669; Tue, 30 Aug 2011 14:52:06 -0400 From: Tom Tromey To: Sanjoy Das Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 4/7] New commands for loading and unloading a reader. References: <1314450736-19389-7-git-send-email-sanjoy@playingwithpointers.com> <1314518609-10204-1-git-send-email-sanjoy@playingwithpointers.com> <1314518609-10204-5-git-send-email-sanjoy@playingwithpointers.com> Date: Tue, 30 Aug 2011 18:52:00 -0000 In-Reply-To: <1314518609-10204-5-git-send-email-sanjoy@playingwithpointers.com> (Sanjoy Das's message of "Sun, 28 Aug 2011 13:33:26 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2011-08/txt/msg00627.txt.bz2 >>>>> "Sanjoy" == Sanjoy Das writes: This patch looks pretty good. Sanjoy> +static struct jit_reader Sanjoy> +{ Sanjoy> + struct gdb_reader_funcs *functions; Sanjoy> +} *loaded_jit_reader = NULL; I think this should also have the gdb_dlopen result in it. In the current patch, jit-reader-unload never calls dlclose, but it seems to me that it should. Sanjoy> + char so_name[PATH_MAX]; Don't use PATH_MAX. Sanjoy> + snprintf (so_name, PATH_MAX, "%s/%s", jit_reader_dir, args); You can use xstrprintf here instead; then make a cleanup to xfree it. Sanjoy> + add_com ("jit-reader-load", no_class, jit_reader_load_command, _("\ I think class_obscure is maybe a better fit than no_class. Though truthfully I can't claim to understand the class_* breakdown very well. Tom