From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id FM7/OhiFAWKAPwAAWB0awg (envelope-from ) for ; Mon, 07 Feb 2022 15:46:16 -0500 Received: by simark.ca (Postfix, from userid 112) id E165C1F3C6; Mon, 7 Feb 2022 15:46:16 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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=ham autolearn_force=no version=3.4.2 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 5CD8D1EA69 for ; Mon, 7 Feb 2022 15:46:16 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 634D03858422 for ; Mon, 7 Feb 2022 20:46:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 634D03858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644266775; bh=nWHd0fa6CbVIT0sxz+BV5PUOYuvjsGlkR3ukswxapTc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=BkUKwT1+Y8MjGoepb25LzMM7c6gSzfTWRlWzOc+y1ivw8AMPrf882X00IJmWQPOm1 irrWCa6pvsFze5Mw8JUmTdnYL3x4gF3z5ORZ+cuDJHEmpvucIKuJtb3KSth7kYsM/3 9XYD9ku78Qo4WlquWhXoo6d8Ff8sQMuWsj4uyVQg= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A02F33858C83 for ; Mon, 7 Feb 2022 20:45:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A02F33858C83 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-70-yx9iq2FCNQaEaHO1dHTVHA-1; Mon, 07 Feb 2022 15:45:55 -0500 X-MC-Unique: yx9iq2FCNQaEaHO1dHTVHA-1 Received: by mail-wm1-f72.google.com with SMTP id bg16-20020a05600c3c9000b0034bea12c043so119420wmb.7 for ; Mon, 07 Feb 2022 12:45:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nWHd0fa6CbVIT0sxz+BV5PUOYuvjsGlkR3ukswxapTc=; b=XQUlRh47GvHqgmzmCMPojs11Kf5Q1d4KAMmj8cNmTLvSD8KiAHXbZBmAZs7FAE2Hns BvTIYSxXQ6op7szPcSPQ4KNUfktR/FtOGSvS7vxneXcqn5y454D8wZ+rL4eKjLyIkzYr H1aPLvzdodF4KNHQgp9eo0wgB0KyvCr12XGQfKEkLtVp478VbqDONJGM5Gxvka+e6byq rrvwscIGjEWMeWfs+65Ao/YcfEuFhr30XASgwE2wsnWXNjmEN4pH00QpsTSQH3fXF3C7 NUQgP40Sw9OWrh/RaBQPxjLl1RKqpgb3Y7zOLjcqXS4YjL/IoYJtA8hOwKlh41Bvm/AH 06fQ== X-Gm-Message-State: AOAM531g2kDYAXfxbGBDYf66tLLuxeOXBPgh31qNzwIFG0SKcsaFWokq rLCes7aucXqCbhg2CWQxs3gZIuhb7dkv47abR0NPNnLcJTc+TZtyyKJOZgA/6+3gu3TW/PI06aP hkS11ZL08AxeT609JyL8CiyevbHzuwwujgk8Jou1MfHsaOvMXMW+wGeKMCfdTOyw20s1RiU+4Lw == X-Received: by 2002:a7b:cf05:: with SMTP id l5mr532323wmg.37.1644266753849; Mon, 07 Feb 2022 12:45:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxqVyI+MMnSGryQQ1/Ird+SRXkbxG0yudXw7+PyG3YRRj7mepzrrWmdlKyepnf5yhyXD8HQA== X-Received: by 2002:a7b:cf05:: with SMTP id l5mr532312wmg.37.1644266753607; Mon, 07 Feb 2022 12:45:53 -0800 (PST) Received: from localhost (host86-134-151-224.range86-134.btcentralplus.com. [86.134.151.224]) by smtp.gmail.com with ESMTPSA id r2sm15019911wrz.99.2022.02.07.12.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 12:45:53 -0800 (PST) To: gdb-patches@sourceware.org Subject: [PATCH] gdb: remove tailing newlines from index_cache_debug calls Date: Mon, 7 Feb 2022 20:45:47 +0000 Message-Id: <20220207204547.3364272-1-aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Cc: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" I noticed that most of the calls to index_cache_debug include a trailing newline. As the new debug mechanism already adds a newline, that means all of these debug calls result in a blank line being printed, which I think is a mistake. Remove all the trailing newlines. I also reformatted one of the index_cache_debug where a string will now fit onto a single line. Unless 'set debug index-cache on' is used, there should be no visible change in output after this commit. --- gdb/dwarf2/index-cache.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c index fa6b7abccd5..fd76917c68b 100644 --- a/gdb/dwarf2/index-cache.c +++ b/gdb/dwarf2/index-cache.c @@ -63,7 +63,7 @@ index_cache::set_directory (std::string dir) m_dir = std::move (dir); - index_cache_debug ("now using directory %s\n", m_dir.c_str ()); + index_cache_debug ("now using directory %s", m_dir.c_str ()); } /* See dwarf-index-cache.h. */ @@ -71,7 +71,7 @@ index_cache::set_directory (std::string dir) void index_cache::enable () { - index_cache_debug ("enabling (%s)\n", m_dir.c_str ()); + index_cache_debug ("enabling (%s)", m_dir.c_str ()); m_enabled = true; } @@ -81,7 +81,7 @@ index_cache::enable () void index_cache::disable () { - index_cache_debug ("disabling\n"); + index_cache_debug ("disabling"); m_enabled = false; } @@ -100,7 +100,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile) const bfd_build_id *build_id = build_id_bfd_get (obj->obfd); if (build_id == nullptr) { - index_cache_debug ("objfile %s has no build id\n", + index_cache_debug ("objfile %s has no build id", objfile_name (obj)); return; } @@ -118,7 +118,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile) if (dwz_build_id == nullptr) { - index_cache_debug ("dwz objfile %s has no build id\n", + index_cache_debug ("dwz objfile %s has no build id", dwz->filename ()); return; } @@ -143,7 +143,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile) return; } - index_cache_debug ("writing index cache for objfile %s\n", + index_cache_debug ("writing index cache for objfile %s", objfile_name (obj)); /* Write the index itself to the directory, using the build id as the @@ -154,8 +154,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile) } catch (const gdb_exception_error &except) { - index_cache_debug ("couldn't store index cache for objfile " - "%s: %s", objfile_name (obj), except.what ()); + index_cache_debug ("couldn't store index cache for objfile %s: %s", + objfile_name (obj), except.what ()); } } @@ -195,7 +195,7 @@ index_cache::lookup_gdb_index (const bfd_build_id *build_id, try { - index_cache_debug ("trying to read %s\n", + index_cache_debug ("trying to read %s", filename.c_str ()); /* Try to map that file. */ @@ -211,7 +211,7 @@ index_cache::lookup_gdb_index (const bfd_build_id *build_id, } catch (const gdb_exception_error &except) { - index_cache_debug ("couldn't read %s: %s\n", + index_cache_debug ("couldn't read %s: %s", filename.c_str (), except.what ()); } -- 2.25.4