From patchwork Wed Dec 13 22:38:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 82102 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 6F0A33860C2C for ; Wed, 13 Dec 2023 22:39:47 +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 E206F385E038 for ; Wed, 13 Dec 2023 22:38:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E206F385E038 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 E206F385E038 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=1702507139; cv=none; b=AmEZfyedf2bBegAUJYLFg3RXqL4aIqgMoOa8JrOKvEoUNeKHUSX8YJhXZQRJgvbSadvUQtmMLZUzQykxjlvjPKysATJn6TeBPngn9bZVbaBeO8wnvmwal2NqHO07XAnM6rEsN8e0J/r12M71L3RHfVlNPG2XQEYuFcrB9Fjf8wc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702507139; c=relaxed/simple; bh=d6B2SWSNpGUtFAhJ01GN41TYiCj64u3w0JuVhEWf+XI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=yB/MelxXLKzaGu3bU+Egb2PHd08EgJ860DmtB1frSKq/biWGab4sYfUT1lDJrOjTu5Un6Y/dxYAziXFXBDt/rvBG1zO6bWJ/UhN+cFNvBA1pBsYyh/4AIWZ3ApMKtxH+dZqAY5XGk3K1+q/+PIkzWFTOz8tfAQzBdpuRMl4U86I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702507137; 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=a8Qq4L/4hTlNgfQ0lBt/ishkPasSKFeborQNkXEd/EU=; b=cM1mi0H1Gei4cK0JSPu0sZnOPzzsUR4HLuyrqR47H3DAq4C2lcGRQNaWTo452S8POHAXMn DTHBlXCtaMKYpP/AhXjR3AEygwg0nkxjbWcza7/INMcHQlW6clKM0x0dDoIn+z+1bus8vP E3AZF7NDpY89aMV5qc1qAvkK92Iumoo= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-j8FEHCK1PoambgH7164LAA-1; Wed, 13 Dec 2023 17:38:55 -0500 X-MC-Unique: j8FEHCK1PoambgH7164LAA-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3334b1055fbso6212655f8f.2 for ; Wed, 13 Dec 2023 14:38:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702507134; x=1703111934; 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=a8Qq4L/4hTlNgfQ0lBt/ishkPasSKFeborQNkXEd/EU=; b=ehoyNJLHDxsrReMotKPPWZ77spo67cFO7E8A7jkeOTnspyJSKtg+HXCKFRNU7a08xD LZ4ednBtiPm5sJ6Xs3L/IFVP6M/elFIHNTG/DF1VKWuk7pReKLxemEXssyaQsEYHjLF2 fO1WulK6rLfQluUdoEFPtQB3Dp0MWpDN/um0i1KP1mHd8owxq0+BXFgeJsu99V0C0KdT BTrDzr9vHS6cd33zn2qbnKNl3oN0KVpgsSGZoJ5sEgjjCzwLhi0THYPr/BdXBA+Wif+O 6jOzT8qq9dJqEG4YBQm2zHTIbwbZNa3XF+OEgfgKF1Zp1fclvphvJQd+xDQn1fqAuZvc NQLQ== X-Gm-Message-State: AOJu0YxnMvy6mtWTEogyV3vQcjjoeJn3FYlAbNFO782zV5XKscTtAKti fcqJfgZ2HGEF6+XxP+qwkvX5Egl6gfYeLTDwuoNW0HVa3gHG+O5nhrOI3hIKAB7snrLFigVT3ra ufrI3X/6XFYrVT3jKTa6KQDJKd3xmgAZGD0KpILTEdMagbZavAU1Du6XMnGU8NbN8aOU3Mxzlms V/pMVAug== X-Received: by 2002:a05:600c:1913:b0:40c:2395:1fb0 with SMTP id j19-20020a05600c191300b0040c23951fb0mr3130819wmq.116.1702507134134; Wed, 13 Dec 2023 14:38:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFcvZQ07NBMmkzTE+8QNPELZxOu7z/SCB6aP81ldFEt4MwtXZ7wMRj6BsCOBn7TmnqcJDZAkQ== X-Received: by 2002:a05:600c:1913:b0:40c:2395:1fb0 with SMTP id j19-20020a05600c191300b0040c23951fb0mr3130815wmq.116.1702507133861; Wed, 13 Dec 2023 14:38:53 -0800 (PST) Received: from localhost (105.226.159.143.dyn.plus.net. [143.159.226.105]) by smtp.gmail.com with ESMTPSA id bh15-20020a05600c3d0f00b0040b4ccdcffbsm22625384wmb.2.2023.12.13.14.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 14:38:51 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv7 10/11] gdb: remove tracepoint_probe_create_sals_from_location_spec Date: Wed, 13 Dec 2023 22:38:34 +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=-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, 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 da47e99979f..b7329e83196 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -284,9 +284,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 = { @@ -301,10 +298,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, }; @@ -12217,17 +12215,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 () {