From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id CE1643858C54 for ; Thu, 28 Apr 2022 03:35:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE1643858C54 X-ASG-Debug-ID: 1651116943-0c856e06add0a450001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id DyvesjxiuEiS3ILv (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Apr 2022 23:35:43 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by smtp.ebox.ca (Postfix) with ESMTP id 72089441B21; Wed, 27 Apr 2022 23:35:43 -0400 (EDT) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.157.6 X-Barracuda-Effective-Source-IP: 192-222-157-6.qc.cable.ebox.net[192.222.157.6] X-Barracuda-Apparent-Source-IP: 192.222.157.6 To: gdb-patches@sourceware.org Subject: [PATCH v3 0/7] Fix printing macros Date: Wed, 27 Apr 2022 23:35:35 -0400 X-ASG-Orig-Subj: [PATCH v3 0/7] Fix printing macros Message-Id: <20220428033542.1636284-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.35.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1651116943 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 2795 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.97646 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-3606.9 required=5.0 tests=BAYES_00, KAM_DMARC_QUARANTINE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2022 03:35:55 -0000 Hi, This is v3 of https://sourceware.org/pipermail/gdb-patches/2022-April/188230.html This new attempt uses an approach similar to v2 (use complete paths to identify symtabs/subfiles and macro_source_files). But instead modifying the existing filename/name fields of symtab and subfile, and therefore causing important UI changes, this new version adds the information in a new field. Patches 3 and 4 are preparatory. Patch 6 removes some code that I believe is made obsolete by patch 5. Simon Marchi (7): gdb: introduce symtab_create_debug_printf gdb: add debug prints in buildsym.c gdb/dwarf: pass compilation directory to line header gdb/dwarf: pass a file_entry to line_header::file_file_name gdb: add "id" fields to identify symtabs and subfiles gdb: remove code to prepend comp dir in buildsym_compunit::start_subfile gdb/testsuite: add macros test for source files compiled in various ways gdb/buildsym-legacy.c | 4 +- gdb/buildsym.c | 41 +- gdb/buildsym.h | 26 +- gdb/ctfread.c | 2 +- gdb/dwarf2/cu.c | 17 +- gdb/dwarf2/line-header.c | 57 +-- gdb/dwarf2/line-header.h | 40 +- gdb/dwarf2/macro.c | 16 +- gdb/dwarf2/read.c | 80 ++-- gdb/elfread.c | 15 +- gdb/jit.c | 3 +- gdb/macroscope.c | 2 +- gdb/mdebugread.c | 2 +- gdb/minsyms.c | 16 +- gdb/psymtab.c | 14 +- gdb/symfile.c | 26 +- gdb/symfile.h | 3 +- gdb/symtab.h | 25 +- gdb/testsuite/gdb.base/macro-source-path.c | 22 + gdb/testsuite/gdb.base/macro-source-path.exp | 87 ++++ .../gdb.dwarf2/dw2-compdir-oldgcc.exp | 2 +- gdb/testsuite/gdb.dwarf2/macro-source-path.c | 20 + .../gdb.dwarf2/macro-source-path.exp | 385 ++++++++++++++++++ gdb/testsuite/lib/dwarf.exp | 92 +++++ gdb/xcoffread.c | 1 + 25 files changed, 837 insertions(+), 161 deletions(-) create mode 100644 gdb/testsuite/gdb.base/macro-source-path.c create mode 100644 gdb/testsuite/gdb.base/macro-source-path.exp create mode 100644 gdb/testsuite/gdb.dwarf2/macro-source-path.c create mode 100644 gdb/testsuite/gdb.dwarf2/macro-source-path.exp base-commit: 414705d1c2d359694459d3991a0975d051ac70b5 -- 2.35.2