From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 2C30B385840F for ; Sun, 31 Mar 2024 10:32:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C30B385840F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2C30B385840F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711881129; cv=none; b=tMWlhV4kXZULUNT97quAqM8lIjY8CXNOUYMYtMHaMOOQq1Y5371ndivIjOZ6zQ9Yi02JuyWeBFGkLqr5exdr/GmHqJVpXU2S1/DMR0AXCK0+XPXZA+wrhFlDnvKPVa/SFMqwhHDvTHQ/rHfQzDHqC65gNi0XQwjamsUH1Dff3zI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711881129; c=relaxed/simple; bh=swDa5xZzzTlbJMoRT4BStFuMtusuxkyIhroEDcEus4E=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Ay0SjenOZRIwCl9cXY1224rhIJxHdtlgdIkIvipDuvLoZuvhfKqecXVOyVhlQROz6+oTtiQUA+nU+qCdNQ/FWlA2oC3nZ8ixK4K+PLFN8FwudMiLUINJWpF+eVDOzKnUDCePQh+bVTnTlwASD50mmAlqwXZQYM8XUxI0Jf33TMg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711881125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ojf1oKYVRMlQ9qRUy+sv8Gc1RYSezzq6iFqKkXdS5bE=; b=P/KANTIBAAk9WqHh/xWHiQL4AaBIRyY2+meHSnSz3mhbzoz6tj4wxJPJbfwprhOHdApNir rNu/RhnIjV4ug3CdGqvO3oh04gOVt070JYx3Iw3XE1BtDKtaxraoIUCNydMReukdP8tWP7 Was34nSHvXdG4S+NJjTPS1UOxnlYSSg= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-656-7LqyaSzpN8-YC0MUAuwUIA-1; Sun, 31 Mar 2024 06:32:04 -0400 X-MC-Unique: 7LqyaSzpN8-YC0MUAuwUIA-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a4e34a32a92so158590266b.0 for ; Sun, 31 Mar 2024 03:32:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711881122; x=1712485922; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ojf1oKYVRMlQ9qRUy+sv8Gc1RYSezzq6iFqKkXdS5bE=; b=WL6SnKbEqE8BSM4QSYlWh2xpud6oalwp33g0LiH4n6nHLu+wuP9TSVuocUsHmsnGKq 5rb0EKb3Fn62S1iJTkS/Or4N6UY1miL9PlXqoJrgeKImAPCt5ZTyGquYP/pQKRu0PR6x vGGStRQayiiXUFDomqNKuLv3TWGr/OqlcqQjS8BFtu6ILAd7nBQMJscZZm/vYpaH5dyf WnbxYwp8lQbFrf8eLY0XaarQHJdZ6VSeNDB/zG070LcWEGZifUZJfudZiQ+M2whsR0M7 bM2yt+wJkvRlDIkUHLcHmKylyHad9XDsXhbcpE4rZLp7bLdHhV6OhFljcQ112xensBwa V6kQ== X-Gm-Message-State: AOJu0Yy6cmWlfW4RimHnGTPIbiGyl1pEiqMLp8w8cA4GMa7I9I7WcKvF lJp6xrfAyP6or8UrSjYukcmjTZ9T7r4nwph8T+Mu7aHcdNzbif4wTN9kFNPdsQajU91s0Sd6E5V aBcTHvep4CP+pHz0uFH7FOu5/0BE+NSDMwZZtZ/RKDmCmdvFxl0Abr2GEGZg0h7p8YfFNtRWGrI w3/RAzLeHrgHnzxIVyPajlwi77Hm8sBt2xZYeMKbpUQbw= X-Received: by 2002:a17:906:2bd0:b0:a4a:3861:d63f with SMTP id n16-20020a1709062bd000b00a4a3861d63fmr5455148ejg.21.1711881121708; Sun, 31 Mar 2024 03:32:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMIkBJPGfXKRNwolvVwC6A6ezNh31povmknaDMGQPbBiApR/NgtaE6jJ+Dy8uXj0XPTDdWYA== X-Received: by 2002:a17:906:2bd0:b0:a4a:3861:d63f with SMTP id n16-20020a1709062bd000b00a4a3861d63fmr5455129ejg.21.1711881121230; Sun, 31 Mar 2024 03:32:01 -0700 (PDT) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id w20-20020a170906481400b00a46aab70226sm4041603ejq.180.2024.03.31.03.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 03:32:01 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv10 4/9] gdb: make breakpoint_debug_printf global Date: Sun, 31 Mar 2024 11:31:48 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: 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-default=true X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This commit makes breakpoint_debug_printf available outside of breakpoint.c. In a later commit I'll want to use this macro from another file. This is just a refactor, there should be no user visible changes after this commit. --- gdb/breakpoint.c | 9 ++------- gdb/breakpoint.h | 8 ++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index afa8e49569a..8a2a0cc7100 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -573,13 +573,8 @@ show_always_inserted_mode (struct ui_file *file, int from_tty, value); } -/* True if breakpoint debug output is enabled. */ -static bool debug_breakpoint = false; - -/* Print a "breakpoint" debug statement. */ -#define breakpoint_debug_printf(fmt, ...) \ - debug_prefixed_printf_cond (debug_breakpoint, "breakpoint", fmt, \ - ##__VA_ARGS__) +/* See breakpoint.h. */ +bool debug_breakpoint = false; /* "show debug breakpoint" implementation. */ static void diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 6da04d5ec00..24aeaf926ec 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -48,6 +48,14 @@ struct linespec_result; struct linespec_sals; struct inferior; +/* True if breakpoint debug output is enabled. */ +extern bool debug_breakpoint; + +/* Print a "breakpoint" debug statement. */ +#define breakpoint_debug_printf(fmt, ...) \ + debug_prefixed_printf_cond (debug_breakpoint, "breakpoint", fmt, \ + ##__VA_ARGS__) + /* Enum for exception-handling support in 'catch throw', 'catch rethrow', 'catch catch' and the MI equivalent. */ -- 2.25.4