Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Christian Biesinger <cbiesinger@google.com>, gdb-patches@sourceware.org
Subject: Re: [PUSHED/OBVIOUS] Make extern declaration of dwarf_always_disassemble correct
Date: Wed, 18 Sep 2019 11:17:00 -0000	[thread overview]
Message-ID: <1b863842-8eef-42ad-8955-a0071752de2a@simark.ca> (raw)
In-Reply-To: <20190918045623.207809-1-cbiesinger@google.com>

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


  reply	other threads:[~2019-09-18 11:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  4:56 Christian Biesinger via gdb-patches
2019-09-18 11:17 ` Simon Marchi [this message]
2019-09-19  4:31   ` [PATCH] Declare dwarf_always_disassemble in dwarf2read.h Christian Biesinger via gdb-patches
2019-09-19 11:01     ` Simon Marchi
2019-09-20  0:15       ` Christian Biesinger via gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b863842-8eef-42ad-8955-a0071752de2a@simark.ca \
    --to=simark@simark.ca \
    --cc=cbiesinger@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox