From patchwork Tue Mar 5 15:21:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 86810 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 B5FC138582A4 for ; Tue, 5 Mar 2024 15:24:51 +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 49A693858295 for ; Tue, 5 Mar 2024 15:22:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 49A693858295 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 49A693858295 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=Ydtb4T6eaGza2Ddm2Q1z9xnX8aWw3vA26KUXtkodzGXuVJ/0Y9NVUHMovfW896lTQoa7zLTt5cmwIK4tp+ZWP9f3J00vnbP3HfkRUJRzLsW/pkflpJ2esfdpznpjQiFScEFd6xiWHdbN6kcQrMHaldvAOcbZXxORlby9lJhSAhw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709652132; c=relaxed/simple; bh=rMDVT4aLVAht2rIHz28iBjVL8SxAv8dTSZsTbOaNc08=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Is4FcSA7xxg5aGiNM9Pt3dZlsKsVLReg0f1Lwx/gO7npJ4Xyu6XLqREBeZef+BdFpzrNXCzQCJ4uK7DlyA0uKcFmdeOL0mCT04vbZ/33mbqiO+YptJoPXFABjkd9sCwEEhbjYTZDiOMFg9nvXvmJUKa8RpstEswyz1P9Jtri2Dw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709652127; 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=Meix3qi/b5eOZGN0myvIRI+Org+CLcNrM4/lpre9M6M=; b=Z892lbFknC0lgpF3OXnpL4z8pv938XZwKJqU8E9YylU1UHFTap24Of6aK/YoUOy0ooAlHu o1MwYKrKFw3Vv7/dZ9NZbxeIlwSjrEbxeA5l59NIaRfsuuwIlv9npCIfKROHtm3oRyoLlF 0Fjr4s7sJtoI8DXkytgiuEoBq5tRcnU= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-452-VC1leMUSNIm9zD40g2zUyA-1; Tue, 05 Mar 2024 10:22:05 -0500 X-MC-Unique: VC1leMUSNIm9zD40g2zUyA-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a450c660cdeso54730966b.3 for ; Tue, 05 Mar 2024 07:22:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709652123; x=1710256923; 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=Meix3qi/b5eOZGN0myvIRI+Org+CLcNrM4/lpre9M6M=; b=jDgxgMthdeIn+STetn/euWync+ObxKjEuBzXqvY/9MOgBy7vczhwvkmAriSJniW2Dd zWFO/HZw9wuCmTwR0TH2VkpKCegWg9ZNk1gt8EM/OEslF8tsFLeQXsovd0jJe5ShNpkj wMleZ4ALBVr+fzNiY3eXeK9nlR1AsZil17zSOoUfc0owCJE0zKN0rjVN3vYzsw3yFrQb 8jgXY1K+2aHqZrIojlgm1aFeYUTfY2kbcRBEuKTh4Mz22VfGKuEbdlrhn6+wV5Oo8dEp DFU5GmZQfhM3QFf/FQmq0kiHq1uN+bcRaBJxSrf3Z0Hb5FgERo7HV4kvgskCWusRsew6 WN1g== X-Gm-Message-State: AOJu0Yzgp6toG+vuUr2vGSJSutFyQmT44LtXTRTb/K8vQymkZ1r7rIpZ F3ZFpon3NAX4zHZOOlKb03cQTEi8XXp1WiqzteiF95XUbKxtx5EBBzHfGu3+9Qwzkd9acOmHGAn HVFhI1BaIM7YDk6Ga3dQ6oB3a+z/GON9UTJRycXmpjTCZuICUvUXJJsNWBVeNUkikg7hjPyNwoV QojVPO50eG7yCihJWcFASJFfmKYMNbXKnmicTSfBP7D5g= X-Received: by 2002:a17:906:5585:b0:a45:231:9b4b with SMTP id y5-20020a170906558500b00a4502319b4bmr5348365ejp.20.1709652123391; Tue, 05 Mar 2024 07:22:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjkHACerVXInR5KHI9TPwQtkZCX+7lo1+VuKZ+nDfS+TVkucfme2MsE2cQQt51O/eohewamQ== X-Received: by 2002:a17:906:5585:b0:a45:231:9b4b with SMTP id y5-20020a170906558500b00a4502319b4bmr5348341ejp.20.1709652122910; Tue, 05 Mar 2024 07:22:02 -0800 (PST) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id l18-20020a1709060e1200b00a459094cf61sm1268905eji.115.2024.03.05.07.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 07:22:00 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv9 08/14] gdb: remove tracepoint_probe_create_sals_from_location_spec Date: Tue, 5 Mar 2024 15:21:39 +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=-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 The tracepoint_probe_create_sals_from_location_spec function just forwards all its arguments to bkpt_probe_create_sals_from_location_spec, and is only used in one place. Lets delete tracepoint_probe_create_sals_from_location_spec and replace it with bkpt_probe_create_sals_from_location_spec. There should be no user visible changes after this commit. --- gdb/breakpoint.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 5e97d27bbf5..bf7c0dc042b 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -283,9 +283,6 @@ static bool strace_marker_p (struct breakpoint *b); static void bkpt_probe_create_sals_from_location_spec (location_spec *locspec, struct linespec_result *canonical); -static void tracepoint_probe_create_sals_from_location_spec - (location_spec *locspec, - struct linespec_result *canonical); const struct breakpoint_ops code_breakpoint_ops = { @@ -300,10 +297,11 @@ static const struct breakpoint_ops bkpt_probe_breakpoint_ops = create_breakpoints_sal, }; -/* Tracepoints set on probes. */ +/* Tracepoints set on probes. We use the same methods as for breakpoints + on probes. */ static const struct breakpoint_ops tracepoint_probe_breakpoint_ops = { - tracepoint_probe_create_sals_from_location_spec, + bkpt_probe_create_sals_from_location_spec, create_breakpoints_sal, }; @@ -12401,17 +12399,6 @@ tracepoint::print_recreate (struct ui_file *fp) const gdb_printf (fp, " passcount %d\n", pass_count); } -/* Virtual table for tracepoints on static probes. */ - -static void -tracepoint_probe_create_sals_from_location_spec - (location_spec *locspec, - struct linespec_result *canonical) -{ - /* We use the same method for breakpoint on probes. */ - bkpt_probe_create_sals_from_location_spec (locspec, canonical); -} - void dprintf_breakpoint::re_set () {