From patchwork Sun Mar 31 10:31:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 87855 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 2C07E3858402 for ; Sun, 31 Mar 2024 10:32:46 +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 5A9B83858286 for ; Sun, 31 Mar 2024 10:32:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A9B83858286 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 5A9B83858286 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=1711881128; cv=none; b=DjOovLlJ+q+W62D3W5nswLyT5hdDjHw8ZsGqSBSFBSALua/pWCDy4VCcw3yZXunSk+o1b2wEe9dirXzdvkAHG1BiR1SX8KTNJEs+n1QbgSH3ygiQpRKtV93AVTJ2mrn2wHijvJE9LvdoYb7wpMu31836Ue6uJGfhZCcmAflEWh4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711881128; c=relaxed/simple; bh=/OeUwhjejxiWlCHbzqGQSiWd3gSIZg/s8FwPm91GnsI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=bgoqZVc0aJrS1wVBvvacLsqy7n5ODhqIsFK0RMrBFoElyi/kmG6wtgXZRy8GXoumxgFBZrElTc4k3BV25KRRbavgCIkU98dzK+SkuIBvmEyS+AFzKw7GP9V3LI3s0b6tlIyFN+cCbE+j6JwchDoCCJkINnclj/bnW+TaNhzy5Ko= 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=jpHXp3P46S4EdfDdRKvtPO3t7sEHJlidkuH4lB21N3E=; b=KIMufXqSIiNmV55nXG1yhm8E3avmBGyL9U+YOB6G54rpILkQzzaG0D8NEE3of1yB+cWKaO 21EMtwMOFQVOiQ/RSXylwD1KrE9LdI5KRk1YTtS+DsCBbBsL1Rxge56iTgk6WqErfsRE6e 9SsiKNkNVzsM7dJNm0qjvKqv2NKtySQ= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-bTo7AgElMHedQ-OwUQrgsQ-1; Sun, 31 Mar 2024 06:32:03 -0400 X-MC-Unique: bTo7AgElMHedQ-OwUQrgsQ-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-516a213a18eso168239e87.2 for ; Sun, 31 Mar 2024 03:32:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711881121; x=1712485921; 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=jpHXp3P46S4EdfDdRKvtPO3t7sEHJlidkuH4lB21N3E=; b=Psf8AR+MNAs8J3RIW+X7Tkvs6r19CyoPtcOgtbymHJouRf/FY3uCJXWfAIu8p4xMq3 /EEX5xexokdpGnuNMB+3SdxVXhZVASL9zc+W3eEw3lWyOAjayFwpNe0IFJ8+NFXHWiM3 FyO106tqHt/DS660dXp5oByD2MHeqNVOYRy6m4CE5YqxEw0PPzSCC/zrkPPk9/bQrKYP no3CPk3QQt05mobJ++dO760zg28uZjWUXx/b0tEpG4DacPRRewOuicx1yuWChCiDUWgP cQy/18f9JV84rAksj4Ypcl8PU5blUKJp4huQHeakkw62YCyHZDKhHgcX/w639YyesLnN eHkQ== X-Gm-Message-State: AOJu0YwP/mNJzSPpmxvL+qnuHdlYjMfuESeeCWdf1b8ICUCLFK9nBq9q atIwAF8UHTCFBWmNnc5qjIDqE431M1+UV0vH94Xh0Ghha9WgXT3pUL/VxBag/mwWCB8CAz4e8gE o3IXWq/QF6OxSQ5DZBck4O87Btk+WzFPbAxva9le75G4k/Y+A4YEUxO2rAp2TcmK+STGDxvtFlq 0d74nHL99hSzeQFR7OGZamYxu4mgLBk/uem0u6mVGZBMw= X-Received: by 2002:a05:6512:61:b0:515:cf42:117b with SMTP id i1-20020a056512006100b00515cf42117bmr5280793lfo.60.1711881120814; Sun, 31 Mar 2024 03:32:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBYae0gfCuSkC2z2TccCPdCSaI0mIFwLXRt5fzUzW+T2NDLyRhJAtR5ssKh6uLBNoYWLDm5w== X-Received: by 2002:a05:6512:61:b0:515:cf42:117b with SMTP id i1-20020a056512006100b00515cf42117bmr5280775lfo.60.1711881120179; Sun, 31 Mar 2024 03:32:00 -0700 (PDT) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id p12-20020a1709060dcc00b00a4e32ea1c3asm3042719eji.146.2024.03.31.03.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 03:31:58 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv10 3/9] gdb: remove tracepoint_probe_create_sals_from_location_spec Date: Sun, 31 Mar 2024 11:31:47 +0100 Message-Id: <272cc3ecb6d61bfa491ff3b6cf226513c8612a57.1711880946.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.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 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 93645f534f2..afa8e49569a 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -282,9 +282,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 = { @@ -299,10 +296,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, }; @@ -12402,17 +12400,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 () {