public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug macros/29034] Can't print macros defined on the command-line with binaries built with clang
Date: Thu, 03 Nov 2022 13:14:08 +0000	[thread overview]
Message-ID: <bug-29034-4717-GYCUQiFOGs@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29034-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29034

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Bruno Larsen <blarsen@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e7e7469e7a31bd5a406a03aa83a1cd648f5ef30d

commit e7e7469e7a31bd5a406a03aa83a1cd648f5ef30d
Author: Bruno Larsen <blarsen@redhat.com>
Date:   Wed Apr 20 14:41:11 2022 -0300

    gdb: Fix issue with Clang CLI macros

    Clang up to version 15 (current) adds macros that were defined in the
    command line or by "other means", according to the Dwarf specification,
    after the last DW_MACRO_end_file, instead of before the first
    DW_MACRO_start_file, as the specification dictates.  When GDB reads the
    macros after the last file is closed, the macros never end up "in scope"
    and so we can't print them.  This has been submitted as a bug to Clang
    developers (https://github.com/llvm/llvm-project/issues/54506), and PR
    macros/29034 was opened for GDB to keep track of this.

    Seeing as there is no expected date for it to be fixed, add a workaround
    for all current versions of Clang.  The workaround detects when
    the main file would be closed and if the producer is Clang, and turns
    that operation into a noop, so we keep a reference to the current_file
    as those macros are read.

    A test case was added to confirm the functionality, and the KFAIL for
    running gdb.base/macro-source-path when using clang.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29034
    Approved-By: Simon Marchi <simon.marchi@efficios.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-11-03 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  0:54 [Bug gdb/29034] New: " simark at simark dot ca
2022-04-08  0:01 ` [Bug macros/29034] " tromey at sourceware dot org
2022-04-08  0:07 ` tromey at sourceware dot org
2022-04-18 19:17 ` blarsen at redhat dot com
2022-11-03 13:14 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-19 13:20 ` aburgess at redhat dot com
2024-05-16 10:29 ` vries at gcc dot gnu.org

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=bug-29034-4717-GYCUQiFOGs@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).