From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oaKWFwLhnGjtqQIAWB0awg (envelope-from ) for ; Wed, 13 Aug 2025 15:01:22 -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=KHe4TDd2; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5CBD01E04C; Wed, 13 Aug 2025 15:01:22 -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=ham 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 A17B01E04C for ; Wed, 13 Aug 2025 15:01:21 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 329413858D37 for ; Wed, 13 Aug 2025 19:01:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 329413858D37 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=KHe4TDd2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 853313858D20 for ; Wed, 13 Aug 2025 19:00:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 853313858D20 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 853313858D20 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=1755111650; cv=none; b=rYhpxS7angenzkbsRTK4BQwWxuDXu/JTsFJXTYJDCHSEnwAc+WtyW6HgT2SIOsWjuh0DXPQ0M1VWMsNyBI5xtCU1XfnLeyL3Qrlwj9Q9+GjggVhBDloXxTXnvN6l5xUsZqE5ZIWyW46OLxL+N/Ah2lkE5FM5ZeJ/vku03zkYWPc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755111650; c=relaxed/simple; bh=yUl3OZmX1W7cehI4dv4kRdb3U5Ko0e91YzSA9Pj0eB0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ZNNLj60YLuh/na04wliUAJCzexKIdjjJ9zgSmlwMN7QxAmfU1D2kJHgqtbEtlAyTWCo1pIYMv73UGuIG3AiFZbhbNdDLY+ATshba/3E/5iBLWkjuPoN5ql7sd19ED6SIYE920OaNzkeDhsoY23I0TTqcPOVYf+knV8s21C8lc7o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 853313858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1755111650; 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=xtATgDIu9Q0Zs1F0q2N1NC1hmkfBg6Md0h3rjxt+Npw=; b=KHe4TDd2PyynI7MlqELg+SsTOsS50vSs4h+rxC2Cl+ayLa5FTF7awujzOhrP4reA5dQnYl 7pPkKWKGttDw8NS6q95hXkMWbDMmIOYCrhDfHev4jdZArhYR229XaB3BPW8XaRtDJTbbkG v/AhxtlAvb/tF4zM2oXMK0M/GK5930Q= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-244-G0LINPDxOw-tUmikWjXe6A-1; Wed, 13 Aug 2025 15:00:49 -0400 X-MC-Unique: G0LINPDxOw-tUmikWjXe6A-1 X-Mimecast-MFC-AGG-ID: G0LINPDxOw-tUmikWjXe6A_1755111648 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-323266dca73so187626a91.0 for ; Wed, 13 Aug 2025 12:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755111648; x=1755716448; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xtATgDIu9Q0Zs1F0q2N1NC1hmkfBg6Md0h3rjxt+Npw=; b=grFCkMAT/inINNASc7MG7fM7HK1szCjxDopd27uEy/kKBb/hIgeqBEA/YfpZgvMws4 fPhHIBBFZjsItVW8jxRb8ZLwKSoIu15db3FeS0Jzg4V+MQT4LhwKngFTteuYZ8X15eqC gC3nFtYS8gTEuy2yxsteyY9CluPQ/n7lfdE1E4JHLXLAA45zTKxHPFNcese6wwXYhFGs NSOHj8VFdX7n/9BA3QOIAGRbZgCeSW7gaF85Au9lchGjceJHZ6HrmcVFFld3ee6uc4tp s2X667pORkztHK8G2s/obKsAKNwEwOeq2ojUJdlI47x7LAD6WNN4rvdpep/kqQeV3jQ6 atmg== X-Gm-Message-State: AOJu0Yw7+r5NFIObR5KEzDP7cvExaVZCFpScqfze+aEIx29uKpW+br0r 4XKwxdKGyLAUG/Fe2roSn++XpICvJWYzJUPXNqBMTYVOsX+XwUweoiMtHZ5QjNB8wORGgW0qfcz 3sN7cpaQWrUw4VzoFA8a20ity/V7iVM8wTRMsOITpa9BsaOdKzUfNvQwS6GukJE4= X-Gm-Gg: ASbGncvbbtSYNe4+WNxwu8UUclrjJrii36XjBhh3kAAqKQL/QCpTduqewBd4fDf1QlK DxH5QKSZG1bhQeoicATa/PWatAv0dcnDldLEBqi2wBrUns9mUMciIf1kFbJwrrIK8epHKKtEVcx zE7sFsZotWmkOhFtoU2wIyp1T1hoZn/LdQ/tdLaaMDnZb9inNhmwK7P7fFc0FzPtufxWqA3QxmE xo8kc6+n0eDqte6LrgPdYXqjUNkNzBWEngiLGx6TOsbqJ+BlzbMlD3LPudfbWt/8IbVZHXexUkE /WHMkPw71HDLgdaq0aWQq+qEHk9BIoZANtaneT0wa1/WQzBuh4U= X-Received: by 2002:a17:90b:2748:b0:321:a2d4:11b6 with SMTP id 98e67ed59e1d1-323279c8b8dmr722304a91.12.1755111647882; Wed, 13 Aug 2025 12:00:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGj4LWtM3rcBZlFAPLjqKj4IfWW4N6sp+uzRk629tCWV66LELYzTBd+0bf1WV+vz3V8P0qNag== X-Received: by 2002:a17:90b:2748:b0:321:a2d4:11b6 with SMTP id 98e67ed59e1d1-323279c8b8dmr722251a91.12.1755111647311; Wed, 13 Aug 2025 12:00:47 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:9a69::1000? ([2804:14d:8084:9a69::1000]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3232553e61asm827833a91.1.2025.08.13.12.00.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Aug 2025 12:00:46 -0700 (PDT) Message-ID: Date: Wed, 13 Aug 2025 16:00:43 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: modernize get_frame_pc_if_available To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20250813130355.2236103-1-guinevere@redhat.com> <871ppfnkvc.fsf@tromey.com> From: Guinevere Larsen In-Reply-To: <871ppfnkvc.fsf@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: oZjSoQ9Cayn_LnOPILTVuC-FhCmT81_JKjVCW-dO80M_1755111648 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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 8/13/25 3:21 PM, Tom Tromey wrote: >>>>>> "Guinevere" == Guinevere Larsen writes: > Guinevere> Now that GDB supports C++17 features, this indirection of a pointer and > Guinevere> returning boolean is unnecessary, since the function can return an > Guinevere> optional, and code that calls it can check if the optional contains a > Guinevere> value. > > Nice change, thanks. > > Guinevere> - && frame_pc_p > Guinevere> + && frame_pc > > I think gdb normally prefers the explicit check of has_value rather than > relying on the conversion to bool. Oh we do? I thought because the conversion was defined explicitly in the library, it would be fine, but I can update it, no problem. > > Tom > -- Cheers, Guinevere Larsen She/it