From patchwork Thu Jan 9 23:27:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Terekhov, Mikhail via Gdb-patches" X-Patchwork-Id: 37280 Received: (qmail 61823 invoked by alias); 9 Jan 2020 23:28:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 61808 invoked by uid 89); 9 Jan 2020 23:28:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-29.5 required=5.0 tests=AWL, BAYES_00, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=H*RU:209.85.210.66, HX-Spam-Relays-External:209.85.210.66, HX-HELO:sk:mail-ot X-HELO: mail-ot1-f66.google.com Received: from mail-ot1-f66.google.com (HELO mail-ot1-f66.google.com) (209.85.210.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Jan 2020 23:28:05 +0000 Received: by mail-ot1-f66.google.com with SMTP id i15so203381oto.2 for ; Thu, 09 Jan 2020 15:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FYTcSWW627GhQM6Srk1iW7Hh44vZwXonpxKTg20Ut+E=; b=AaQmJwTVfGVnuMVwPWSLk+V6mYm8wDIyOtJ8BOfcVcUTV/66MhnR0JzYnLSo1H9IW1 QupKgEfxgBGRCzXXQPO9tCctgc62WkoZq8mogXRpi6I960uyKJjUGSFC+Hdww9NIldkN H4sZP1ElHyYarfzYM8ZA7cumFNi7My8AcIoCRMOwGtDbx7Z6P5LmPrG94G75Sx45G37I VzFSnxAhNMc1dn9QQoSYODsmCZX5C/lJBH7lWtP06C+kfxomQTor1PZ07catb7LmMoQX 2jOrL+h95idg3E7tF2NyIgk+a9HRbA6nJAC1QbbD6Ue1dJJS+fie9OEhybuPN1LoPuyk Qn4w== MIME-Version: 1.0 References: <87h814r6p4.fsf@tromey.com> In-Reply-To: X-Patchwork-Original-From: "Christian Biesinger via gdb-patches" From: "Terekhov, Mikhail via Gdb-patches" Reply-To: Christian Biesinger Date: Thu, 9 Jan 2020 17:27:27 -0600 Message-ID: Subject: Re: [PATCH 1/1] Add debuginfod support to GDB To: Aaron Merey Cc: Tom Tromey , gdb-patches X-IsSubscribed: yes On Thu, Jan 9, 2020 at 4:41 PM Aaron Merey wrote: > > On Thu, Jan 9, 2020 at 10:27 AM Tom Tromey wrote: > > Aaron> * config/debuginfod.m4: New file. Add macro AC_DEBUGINFOD. > > Aaron> Adds new configure option --with-debuginfod. > > Aaron> * configure: Regenerate. > > Aaron> * configure.ac: Call AC_DEBUGINFOD. > > > > Does the top-level configure really need AC_DEBUGINFOD? > > > > If so, then this part of the patch has to go to gcc-patches first. > > But, I suspect it's not needed, in which case dropping it is more > > convenient, because we can have debuginfod.m4 locally and not involve > > gcc at all. > > The reason for the top-level AC_DEBUGINFOD is to prevent the top-level > configure check from succeeding in cases where --with-debuginfod is > given but the debuginfod library or header cannot be found. Why is debuginfo special in that way? There are a lot of other libraries in the same situation. Other comments: diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 04979f3d12..f9c06b8cc6 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2708,6 +2711,45 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) + char *alt_filename; + debuginfod_client *client; + + client = debuginfod_begin (); Now that GDB is C++, I'd move the declarations to where the variables are used, e.g.: debuginfod_client *client = debuginfod_begin (); + if (client != NULL) nullptr +++ b/gdb/elfread.c same here Don't you also need to update gdb/README (the `configure' options section) and doc/gdb.texinfo (@node Configure Options)? Christian