From patchwork Tue Mar 5 15:21:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 86808 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED23E3858009 for ; Tue, 5 Mar 2024 15:24:14 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org 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 4ECB1385840A for ; Tue, 5 Mar 2024 15:22:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4ECB1385840A 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 4ECB1385840A 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=1709652132; cv=none; b=BzhMOxCTbSI9VTiSNfq7izF7rhC6Ou0VHkVNMs1lEifAWSpccfDRYihzVlfn2m1B+3N/Okmy13GLa2JoV6ba0wkKh66FWJtDDkRyK5b5CPr6wwQIBKl81Y8qijFPYW9cruO+wvAO/hrlYunn+CBY8PC9zuDAMp+EPp8VVuyzYVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709652132; c=relaxed/simple; bh=rt9Dlq8Y3h4d8EEVTuwk7cJI8muv4eGPFDjlzWrUKLk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ox6B9AuGGffXmqB3J4PIV9xAxhqgB1mpqwg4NP4fR5ZC/6ppuT0nESCdeUlJrs8Jboqtnjoy1/Tq9uCimbpPx0KYx7EolSI8rQDAy9TbQfniU2quyip44gsycF5+nXfRWlEzPGqdaZJBfbsQd0Bwumv4OmMdlxKtgALfz0xtFdU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709652129; 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=RnSlRXCdwR+ec5vI374SnVd7vkgEt1elSlXiWfxbkDk=; b=FKgWxmCxSflLNE/170FyltcPxbpyJ2bo9eFKNtG8dMDUp0r/Ul+skDqhXn2rE4EHxAcXdc rah5kiA9n8SoOJioPV/DSECaBH1U1D0NVejKSthZ88d/lHENLO6Iayk2lw9R83FbKXADm0 Ll4FANK2trThaZmk17IVFbygn+U4mtQ= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-652-qgLZp9_NO7Gpa4-yzc_zNg-1; Tue, 05 Mar 2024 10:22:07 -0500 X-MC-Unique: qgLZp9_NO7Gpa4-yzc_zNg-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2d32d9a312eso34502701fa.2 for ; Tue, 05 Mar 2024 07:22:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709652125; x=1710256925; 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=RnSlRXCdwR+ec5vI374SnVd7vkgEt1elSlXiWfxbkDk=; b=c/QjJ8neKHf9PNsXiO4scitN4MTvSqLiaCT8eT5y/By6bYKAknojfG5tHhlAGllv4I OJMS0mEmorFDoKomt+XqoH2LXg+bxiQGZUXltmkhso0okGXWbK2b7Y8oyZ5sWnEJ5a02 VQc2tEnlrm8CpG0v7BANKIZWEPEj2vuLALjR87gQcw57lA42WubhC7bWXXAwczmR4ykV xjebupJVebMK8UW7qvkaeEmClEfzLGMFrH4ziGNYaL4FEYBd409wLyByrm+KTRQ14bSr dzT3LBcu1/otCKg7QWEBG25ZPpFfymjHWOHi24NQuzlbEyzOrxVFd9aQiFsl2JthxDzM sEwg== X-Gm-Message-State: AOJu0YxMAEmoKIGSm3g7vdoh2jX4of4908fGnOD564hCOAsbmxkczF+/ LEMfYc5hAa5ZYfINHL+ti6lnDybsl0AbXWMYSeLalg+/AvX1eN8tHVVtjzJNgAZGrXX8PIrTanc wesAhTpHM2ei1OmUANXzY+/iZXrV3grpTOroJiJ1eIQAvqq0XtQLnIRGUQjzchxBQcGxVWvCW5Y dR3qAEWNRefEe2WLu0ZeOo7i1cZf5fiyBzXco6QpHrd+U= X-Received: by 2002:a2e:a609:0:b0:2d2:9fc2:9bb8 with SMTP id v9-20020a2ea609000000b002d29fc29bb8mr1359284ljp.25.1709652125483; Tue, 05 Mar 2024 07:22:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGD75DyTXQElpXEGrfEhMoZjkEe7PrU9Rhg+EdL56l4/JnEHyDxI4aAmPLYYYJX5nIBTlo1lQ== X-Received: by 2002:a2e:a609:0:b0:2d2:9fc2:9bb8 with SMTP id v9-20020a2ea609000000b002d29fc29bb8mr1359252ljp.25.1709652124811; Tue, 05 Mar 2024 07:22:04 -0800 (PST) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id o14-20020aa7c7ce000000b0056742460f68sm2650858eds.66.2024.03.05.07.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 07:22:03 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv9 09/14] gdb: make breakpoint_debug_printf global Date: Tue, 5 Mar 2024 15:21:40 +0000 Message-Id: <2693fa8935ac65555501ad3f3d6bb1f2e6d29f9e.1709651994.git.aburgess@redhat.com> 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 X-Spam-Status: No, score=-12.3 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org 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 bf7c0dc042b..d940786e6d3 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -574,13 +574,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. */