From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61955 invoked by alias); 18 Sep 2019 11:17:54 -0000 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 Received: (qmail 61947 invoked by uid 89); 18 Sep 2019 11:17:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=opportunity X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2019 11:17:52 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D1F791E05A; Wed, 18 Sep 2019 07:17:50 -0400 (EDT) Subject: Re: [PUSHED/OBVIOUS] Make extern declaration of dwarf_always_disassemble correct To: Christian Biesinger , gdb-patches@sourceware.org References: <20190918045623.207809-1-cbiesinger@google.com> From: Simon Marchi Message-ID: <1b863842-8eef-42ad-8955-a0071752de2a@simark.ca> Date: Wed, 18 Sep 2019 11:17:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: <20190918045623.207809-1-cbiesinger@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-09/txt/msg00336.txt.bz2 On 2019-09-18 12:56 a.m., Christian Biesinger via gdb-patches wrote: > This was an oversight in 491144b5e21bbfd41969c175aebb663976f59058; > dwarf2loc.c has an extern definition for dwarf_always_disassemble > that I missed. This patch updates it from int to bool to match > the definition in dwarf2read.c. Hi Christian, I think we should take that opportunity to fix the problem in a way that would have prevented this mistake and make things cleaner. Can you try to move the declaration of dwarf_always_disassemble to dwarf2read.h, remove the declaration from dwarf2loc.c, and make dwarf2loc.c include dwarf2read.h? I think it's just for historical reasons that this variable has a local declaration in dwarf2loc.c (dwarf2read.h exists since not so long ago), but as we saw it's a bit dangerous to do it this way. Simon