From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18938 invoked by alias); 10 Aug 2011 21:01:35 -0000 Received: (qmail 18930 invoked by uid 22791); 10 Aug 2011 21:01:35 -0000 X-SWARE-Spam-Status: No, hits=-7.3 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; Wed, 10 Aug 2011 21:01:19 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7AL1JJF009516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 10 Aug 2011 17:01:19 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7AL1Ir4032202; Wed, 10 Aug 2011 17:01:18 -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 p7AL1HGX005694; Wed, 10 Aug 2011 17:01:17 -0400 From: Tom Tromey To: Sanjoy Das Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/7] Add platform agnostic dynamic loading code. References: <1312903509-25132-1-git-send-email-sanjoy@playingwithpointers.com> <1312903509-25132-3-git-send-email-sanjoy@playingwithpointers.com> Date: Wed, 10 Aug 2011 21:01:00 -0000 In-Reply-To: <1312903509-25132-3-git-send-email-sanjoy@playingwithpointers.com> (Sanjoy Das's message of "Tue, 9 Aug 2011 20:55:04 +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/msg00227.txt.bz2 >>>>> "Sanjoy" == Sanjoy Das writes: Sanjoy> * gdb-dlfcn.h, gdb-dlfcn.c: New. Sanjoy> * Makefile.in: Add gdb_dlcfn.c and gdb_dlcfn.h to the build system. Sanjoy> * configure.ac, config.in: Check for -ldl and accordingly define HAVE_LIBDL. Looks pretty good. Sanjoy> diff --git a/gdb/gdb-dlfcn.c b/gdb/gdb-dlfcn.c Sanjoy> new file mode 100644 Sanjoy> index 0000000..91e8a22 Sanjoy> --- /dev/null Sanjoy> +++ b/gdb/gdb-dlfcn.c Sanjoy> @@ -0,0 +1,49 @@ Sanjoy> +#include "gdb-dlfcn.h" Sanjoy> + Sanjoy> +#include "config.h" This file needs a copyright header. Instead of config.h, include defs.h first thing. Sanjoy> +int Sanjoy> +gdb_dlclose (void *handle) Needs a comment describing the return value. For a new self-contained module like this, I'd rather the comments be in the header than in the implementation. Tom