From patchwork Fri Dec 29 09:27:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 82988 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 C63F83858429 for ; Fri, 29 Dec 2023 09:35:09 +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.129.124]) by sourceware.org (Postfix) with ESMTPS id 8DA4D3858428 for ; Fri, 29 Dec 2023 09:27:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DA4D3858428 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 8DA4D3858428 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703842062; cv=none; b=MdlheYR0U+9Orhr4HplpS1M7CkV262OQEb3OK5SJjuJUg6wpmXCIec333+Xw+7gSfMBjUokob2FRpuhONc30u/r7JxIXW6/IF0SZrrF6g85LT1Dpf4qfbR2pGRyLOR/G/fsgA1fl6oIeJcSSZi30ztgHbNs5oN8at+W15/IVC3Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703842062; c=relaxed/simple; bh=GV83DvdEYZ1BQahneaIC6hoDjzFz5Bj6/dLKAAlBL34=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=kzTiAwoMO+ObuAfw3GswBKIQqYT4vvURD9hYbBU+IvwtmQLkh43XM8yihme7wLGj2gv7p2tpOTrCC6oBfbzoQw/71+HZfJzEORbtwqB3kCVKxC5PMsOoQtB7lJzvsrXShze/xvMxDD/wAlUJvtElSCIT+pZoRCPsbkkzzMuxMhY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703842050; 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=SeP7RZeEQxoDnM7Rj3DQbhXibX6SMoBzXGAheiyUtgI=; b=VUYhMo2G1oaElBDsOoLyBnubLEoNOr/lzz9llOVQtrD8l8E8Qc0iDZhxyvwswOEcvx9Hbf nMpNC1pqstek5w8GPD1JWXBM72nWzOS2QA021640vMVI+21sPlsnubS9w2qxoz2kVnMvmO /qJN4ctxeeoiwdH+mp32X8X/dNWvaIQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-643-5_bDHYm1PS2dUwAiopVHIQ-1; Fri, 29 Dec 2023 04:27:28 -0500 X-MC-Unique: 5_bDHYm1PS2dUwAiopVHIQ-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40d45be1ce2so30534815e9.1 for ; Fri, 29 Dec 2023 01:27:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703842047; x=1704446847; 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=SeP7RZeEQxoDnM7Rj3DQbhXibX6SMoBzXGAheiyUtgI=; b=c/ou7Le4YjECeMb0oX5Kfh9uKscSpibJ0Q5DemWdjq8Czgju6VHTlAN+T+AcivaSp8 JVZiqJD6s2T+8ody9TduJaTZAz/EZQGqGQF8AgI39ZMn+Se1zu80PTr5h4dloKVpIy4Q F2tgiMTtLY8rnAx5egUK5jT/819+2bVa2XS0RBfxd1RaKpS/C2o76E2BLf6CwHLLYHLL AiWSHFwnEB4iZyQpaY8eF4Z6E01XC1NjpGubhXZI96CdCvsWSLRFVU+swI31f/MHuEwH b74ft2wkKc6P67QcmoLEtaa4fCAXGp2rpNDqbWZKjf7DvvZH0vKMT77pfps2/BGg3gy7 ZJIg== X-Gm-Message-State: AOJu0Yyoh96DPwmfXcv8EmuLrKpDg4jyu9oiffuoT5dwYNU0RUGy9on1 Am76WK/w/rLAQf0p6W61qhKUqyjqOd+n7y+p2lYGQysXdvJB/2Pd7j86znBNMIil+OlgZBsFnJr cgKKR9P+tQsTVw104AkOM4KP1Nf0HtTsLnx+5UxgDI57wAgPL7cEzYkXDyddvcf0Mep1kLw8sUx 0XGjcaWJDrZVpUIA== X-Received: by 2002:a05:600c:4ab0:b0:40d:4155:d801 with SMTP id b48-20020a05600c4ab000b0040d4155d801mr5671502wmp.128.1703842046996; Fri, 29 Dec 2023 01:27:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbVvtvklAxDbXY71besaet/S1yudwsq4Ug1f7kltWHP91TlObYC/eJIcvfVmnaBwXCTT+YWQ== X-Received: by 2002:a05:600c:4ab0:b0:40d:4155:d801 with SMTP id b48-20020a05600c4ab000b0040d4155d801mr5671494wmp.128.1703842046750; Fri, 29 Dec 2023 01:27:26 -0800 (PST) Received: from localhost ([2a00:23c7:c696:e701:85a5:8a0c:1403:2dc]) by smtp.gmail.com with ESMTPSA id j10-20020a05600c1c0a00b0040d5b7b9ba1sm11080929wms.6.2023.12.29.01.27.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 01:27:26 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv8 09/14] gdb: make breakpoint_debug_printf global Date: Fri, 29 Dec 2023 09:27:04 +0000 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 X-Spam-Status: No, score=-13.4 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 232186888ae..1fdeae731a0 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 95f98b59e41..119bab86e7e 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. */