From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GCN4HzMMamL0AwMAWB0awg (envelope-from ) for ; Wed, 27 Apr 2022 23:38:27 -0400 Received: by simark.ca (Postfix, from userid 112) id 7CC641E058; Wed, 27 Apr 2022 23:38:27 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=tsxqnvtm; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 287061E00E for ; Wed, 27 Apr 2022 23:38:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8786C3858D1E for ; Thu, 28 Apr 2022 03:38:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8786C3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651117106; bh=bsdOTf6AwNoWxnvDgmjpHy0G1EdZ5wQGSuHq8jZ1Wx8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tsxqnvtmQ8at3Q8mCk7feSWZNZwqzu727HCVRcZtIN/h14rbWZWQxDraBE8lNSM2Y twnV3pncIDAj5JPYsnxSHmtGrremoWrpVmKEkhB0VrBH6AVCVg9UCFyqUSenpmEV7j CfayYVBQ5ufX2naSMM1W6eXENlKk4oovsVPF6GfI= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 06613385742C for ; Thu, 28 Apr 2022 03:35:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 06613385742C X-ASG-Debug-ID: 1651116943-0c856e06add0a460001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id CGE1EFTSKJsF7DxM (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 95DA0441D65; Wed, 27 Apr 2022 23:35:43 -0400 (EDT) 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 2/7] gdb: add debug prints in buildsym.c Date: Wed, 27 Apr 2022 23:35:37 -0400 X-ASG-Orig-Subj: [PATCH v3 2/7] gdb: add debug prints in buildsym.c Message-Id: <20220428033542.1636284-3-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220428033542.1636284-1-simon.marchi@polymtl.ca> References: <20220428033542.1636284-1-simon.marchi@polymtl.ca> 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: 1409 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-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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Add a few debug prints in buildsym.c that were helpful to me in writing this series. Change-Id: If10a818feaee3ce1b78a2a254013b62dd578002b --- gdb/buildsym.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gdb/buildsym.c b/gdb/buildsym.c index c54e6586cedb..feef5038773f 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -496,6 +496,8 @@ buildsym_compunit::start_subfile (const char *name) { /* See if this subfile is already registered. */ + symtab_create_debug_printf ("name = %s", name); + for (subfile *subfile = m_subfiles; subfile; subfile = subfile->next) { std::string subfile_name_holder; @@ -516,6 +518,8 @@ buildsym_compunit::start_subfile (const char *name) if (FILENAME_CMP (subfile_name, name) == 0) { + symtab_create_debug_printf ("found existing symtab with name %s (%s)", + subfile->name.c_str (), subfile_name); m_current_subfile = subfile; return; } @@ -744,6 +748,9 @@ buildsym_compunit::watch_main_source_file_lossage () Copy its line_vector and symtab to the main subfile and then discard it. */ + symtab_create_debug_printf ("using subfile %s as the main subfile", + mainsub_alias->name.c_str ()); + mainsub->line_vector_entries = std::move (mainsub_alias->line_vector_entries); mainsub->symtab = mainsub_alias->symtab; -- 2.35.2