From patchwork Sat Jul 20 17:03:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 94256 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 74A923861003 for ; Sat, 20 Jul 2024 17:04:04 +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 08F8A3858C50 for ; Sat, 20 Jul 2024 17:03:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 08F8A3858C50 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 08F8A3858C50 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=1721495010; cv=none; b=NNfbM3giOZvcyxzaarr0/rtv/qo5EkS8elXAio1TP17AwVGvrstB/Xf04KDjf9KERvyZ1KMtx+VjmhgZJ9sBlJPiO7vLbbU2ucWKVriyQwfPeY/NmHNSCw5VBXmO/x3/C2FSdeL2jVNnfKT3oN4rEmGO+1/ieJoQCMXOwwTwzFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721495010; c=relaxed/simple; bh=p8+n+Pr2YEHLF/qTOsMtbnZO1+bX9onpITGDJFJ9CpA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=BI4PTarg2m6qN5LpG3DQEkKfu4CHdGmZWBY1GPXgK4kfyArXZMOfXWvZEfY7HfY+Vr9A8ru3BI9YVdOpn/jXjEESBcRoaO2YcOdTOOqp1O89g/lQXlLfNOy8qgEZu01MhOQ3kg2clf2j7W9L3cpxP+ynWvu0tlbim/ubraUVtu0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721495008; 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=6wYVsr5dSSq/N/emvvls2jIOM9xtQeSUdpocp6Y/7Jo=; b=ggYFN0pnM4lSAYAaDl5Zye4Z1ogG8ob0DGsDN8Kf7Wwz8OmWwRz1AqtPeLDXakUaPeIfqm lXFWV2RrxuitK7GG9VOVDH07Pdz06tWjTWpAYqUXyiETfDx0MYlclbSe8zjXjYxuh0P9Ye 0PRXaVIOxzlfyn442h/je3t59MMnsBA= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-524-5IVsXTGcPj2WZrgQ8d4yNw-1; Sat, 20 Jul 2024 13:03:27 -0400 X-MC-Unique: 5IVsXTGcPj2WZrgQ8d4yNw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42725d3ae3eso20410355e9.3 for ; Sat, 20 Jul 2024 10:03:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721495004; x=1722099804; 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=6wYVsr5dSSq/N/emvvls2jIOM9xtQeSUdpocp6Y/7Jo=; b=mZ4eTnJo7a8IMh8/7nPK4KJN/BSnTmHKQW3lwXe8YaxRLzgxa/AY0Kvvym6HRloiwV iERqMgbyHCnOFfRMm0+Hi8swC+qJ1XZAHMWdou7DoZj0/ZrnOuL+9FVqIpj1Q9x257Rq jY610FfnlFh7JqQGUonTBmxN4gH+WHVPuokJl/JbVroiJnZPKMZ9ka/hgp0hb9jqrDxc +fQ09e1bvxbxetiPzxzQ8AQNUbbuyLVna7Rl/SLtoCMUMeKOLUIg3jxctJp9bmwQfjEB Jdi7xH0BNKgmxHTJpqhwxcCqdTjTYvPnFL9pqzsSTni8qBT+9dCJ5l6zpnlQCi6A/ZOz andA== X-Gm-Message-State: AOJu0Yx8c0KScQ6Q3K3ScKB/Tp+WPINiLKdXGi8kJGrAme1hYCYHqWK1 HIadpg4kW/Ls7p2mABNL39J1NdmGmvdHObcL7cJXmygSBfh1PeXR0mCD4oBeF8epLl07lJkUQw+ 1E7Wy1HkfL++/re66J4dJj0wm385kRTnI7/agGG1qsd0O/0gwYjiSQBM7Q/+NZCy1xZO1+TZe6R 8QaR5gfC1DEUGomFFHZj90j+EA7E5drs8iUkwo47nfeJM= X-Received: by 2002:a05:600c:4f96:b0:426:5b22:4d61 with SMTP id 5b1f17b1804b1-427dc52547emr13503645e9.22.1721495004681; Sat, 20 Jul 2024 10:03:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHySmCr3LhgMI46JtSBWzMKWTjgvX65AaanylWRgXF5p31K03bZS+XQVnEnjhtSGwKwmUysAg== X-Received: by 2002:a05:600c:4f96:b0:426:5b22:4d61 with SMTP id 5b1f17b1804b1-427dc52547emr13503535e9.22.1721495004223; Sat, 20 Jul 2024 10:03:24 -0700 (PDT) Received: from localhost ([31.111.84.186]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d69073d5sm63163285e9.25.2024.07.20.10.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jul 2024 10:03:22 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv12 1/6] gdb: make breakpoint_debug_printf global Date: Sat, 20 Jul 2024 18:03:14 +0100 Message-Id: <0b6eb9fb840dc82b6ef99e8e79f9571713b8203d.1721494871.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=-11.7 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 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 670a3f7acf7..4516d47e7a1 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 ddc37196661..d6d42c705c6 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -46,6 +46,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. */