From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cctHBBBk9GgxcT4AWB0awg (envelope-from ) for ; Sun, 19 Oct 2025 00:07:44 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=inMAnDLL; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0DA1B1E04C; Sun, 19 Oct 2025 00:07:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=unavailable autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9E1F31E04C for ; Sun, 19 Oct 2025 00:07:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0447C3858C66 for ; Sun, 19 Oct 2025 04:07:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0447C3858C66 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=inMAnDLL Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id E50053858D2A for ; Sun, 19 Oct 2025 04:07:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E50053858D2A Authentication-Results: sourceware.org; dmarc=pass (p=quarantine 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 E50053858D2A 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=1760846829; cv=none; b=dj16W+rK+joDfiuPoS/2aG84tVEBstnPqxT9hhYfi17AFovxK3IR5CmKk1Gv+vXzTij0Bo+8bA3hOrwLsBBHMjTBNJRfx/q/ZrSVXmPGl2wHa3gB9Blzq+4EGjC4dTVN9sSMLR93Rcfxjzy8b4plcBzCMIlOO+bKzl5M0W5iORM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760846829; c=relaxed/simple; bh=7mEEBq/RqriuwOJKgT4KIPVE8b8yajmH+EH7gd1Bz/M=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=dI6wqNY94Sg3ztJ2RT6BeI5cczgjNZ/bnG4cjHd5H621hqgJ0m6T5KsdBEnP+W+asMz9MGz7EGQE44xXekPEhQenascQEDJCVhfJMJ++l8aKzl+GQ4bOjUcFGh208ekYwetWvjVAh01T35DJ3tP3+AdD+IrNF3Bf46pXw+s8904= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E50053858D2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760846828; 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=ZGTPp0EgXoIk9j9T+ydXh+vcCiOSRz3ohOulc7pxfFY=; b=inMAnDLL0T84iWpObVEw/4wfY67o76U+6vfPEZnrNe86FtUKFsGmZfT3R7BZZLYBBARdbD 20KCxryNZUs1nng6npcBzQyNHm1OmJpAnPg1YZPHXnCbJ2vynBZGOjc4it/v63KpcLxIRU W0GqZAeEZ/zCkWjgxXv4fXcua4OeCh0= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-417-AXzub9YVNju5aVhRZKJBTA-1; Sun, 19 Oct 2025 00:07:07 -0400 X-MC-Unique: AXzub9YVNju5aVhRZKJBTA-1 X-Mimecast-MFC-AGG-ID: AXzub9YVNju5aVhRZKJBTA_1760846826 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 259B41956088; Sun, 19 Oct 2025 04:07:06 +0000 (UTC) Received: from f41-zbm-amd (unknown [10.22.80.23]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 439121800577; Sun, 19 Oct 2025 04:07:05 +0000 (UTC) Date: Sat, 18 Oct 2025 21:07:02 -0700 From: Kevin Buettner To: simon.marchi@polymtl.ca Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 00/10] Rename some symtab find functions Message-ID: <20251018210702.18409872@f41-zbm-amd> In-Reply-To: <20251016001154.3969223-1-simon.marchi@polymtl.ca> References: <20251016001154.3969223-1-simon.marchi@polymtl.ca> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1sURwBxXZi1EeEddpNWdr4A1oPRA0Y86esqKgr0wEAw_1760846826 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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~public-inbox=simark.ca@sourceware.org On Wed, 15 Oct 2025 20:07:54 -0400 simon.marchi@polymtl.ca wrote: > From: Simon Marchi > > I have long been confused by the names of the functions to look up > things in symtab. For a function named find_foo_bar, it's not obvious > if it finds a foo from a bar or vice-versa (answer: it finds a bar for a > given foo). When asking around on IRC a while ago, a few people agreed. > I'm therefore proposing to rename those functions to be of the form > find_bar_for_foo. > > Simon Marchi (10): > gdb: rename find_pc_function -> find_symbol_for_pc > gdb: rename find_pc_sect_function -> find_symbol_for_pc_sect > gdb: rename find_pc_sect_containing_function -> > find_symbol_for_pc_sect_maybe_inline > gdb: rename find_pc_compunit_symtab -> find_compunit_symtab_for_pc > gdb: rename find_pc_sect_compunit_symtab -> > find_compunit_symtab_for_pc_sect > gdb: rename find_pc_line_pc_range -> find_line_pc_range_for_pc > gdb: rename find_pc_line -> find_sal_for_pc > gdb: rename find_pc_sect_line -> find_sal_for_pc_sect > gdb: rename find_pc_line_symtab -> find_symtab_for_pc > gdb: rename find_line_pc_range -> find_pc_range_for_sal I wholeheartedly approve of these name changes. Over the years, I've been confused by these names too. Approved-by: Kevin Buettner