From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rjcxGfUTRGk+NAgAWB0awg (envelope-from ) for ; Thu, 18 Dec 2025 09:47:17 -0500 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=N3GgtcSN; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 582831E0AB; Thu, 18 Dec 2025 09:47:17 -0500 (EST) 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 vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 8A59C1E08D for ; Thu, 18 Dec 2025 09:47:16 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id ED3774BA2E05 for ; Thu, 18 Dec 2025 14:47:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED3774BA2E05 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=N3GgtcSN 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 8196E4BA2E1C for ; Thu, 18 Dec 2025 14:46:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8196E4BA2E1C 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 8196E4BA2E1C 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=1766069200; cv=none; b=gQEqukBqt8ehlEGKLHHUVxh0VRVRzZEwJpO+NJGY8hr4mrFgkk+Jmmtw24myrWzQILNdziMKHVGZVwcJHFOeCSi4Znt9AAy9VY9YpgHbkpVSWxEdYvkXV8+bWe5gv7pQWu/XnTcsI7UzvBL1NAvnNE5qHSmxFgZkl8ppdA5kUtQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766069200; c=relaxed/simple; bh=/wiGkqkRBYFe16Hu5nnp8b6xf5v7NycEqgeT76T9VXg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=NaD8YymtlECqMatHgsnnyt6QQqJFLSs7LNqXI/hNSpZABwwP1UCtYsaIhdXXxLfRVMwjsMYyqWLkrObt+HiLCNQm/z9qcmT3Qms/qpHrWdLoBXlHNUh9ZmkDz3ymcrbN/XXeaRvQ+vnJ32bjbj+1/iKT/J5ALHQeuQT9WGhVBIQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8196E4BA2E1C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1766069200; 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: in-reply-to:in-reply-to:references:references; bh=mNY6NYx+57xfTE92LpHYQoFqx4vk0AwvZx3I8mVCCQA=; b=N3GgtcSNpokmWMP5QlGLO/JwBK4smOv22VxFa9diPES4YQ+lnK8cGdpQRHq4yFa4V/x+r2 7V9XN90eDNm0IITedu2SgyjKlshnrtkST4bowPRdR7N8Go58bVePyVMrO/+8h0vTRAcnbt AC1lMyUZtIV28Es90hP1HJlhkAsdWeg= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-248-VHdYeVdnPWi3cQ3I1m5VDg-1; Thu, 18 Dec 2025 09:46:39 -0500 X-MC-Unique: VHdYeVdnPWi3cQ3I1m5VDg-1 X-Mimecast-MFC-AGG-ID: VHdYeVdnPWi3cQ3I1m5VDg_1766069198 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-430f5dcd4cdso356146f8f.2 for ; Thu, 18 Dec 2025 06:46:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766069197; x=1766673997; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mNY6NYx+57xfTE92LpHYQoFqx4vk0AwvZx3I8mVCCQA=; b=tHrzzBu4TT0J0KfpS4JR9WRoNouvFXRccl4bGaPOUiTM7QMJaYwzrs9T6XNA0aR+sU BATFyP747QrEPch+UkTxigsx7m5HraifxIZW5df+uSwqWBVnnoT5e3Xsz/eVyw3AwWBI +IwuNpV6PW/OyujdswnBkkPiWz58NjZWgK1rC4eywPlUaGV7sl4I8scKtTuLGJI5Yiw4 q45LfxzMSyYI8ub3qXEjzb/Igu06f3W23wyDZx6c2bxrpSL9Yfvb76LRRA6VcFJC2sk1 NcRA3rnutpYDZnH7QIb2f60qKrro3gNjMTWoL9AsrThsWUJGgn2fwDqd4ozTN5osVq0v LDLQ== X-Gm-Message-State: AOJu0YyoI+vwP7Y59U62K/w/qguwSc6yjrUqennmmqxR+aKhB6PqhTlG W3ISompuzN3X613yVS1pFdOm0uSRaPJul+P3j9IvEvVLHCCXMgX/iIzEx+6Whas3toqPh6MiZ7s 5eXG2xr9PIDAGirX53eLme8vVdK4rfr1T7Dc0i4v7IvHhpp3HfXjXdQM6qH7brzCq2ZL3tDc= X-Gm-Gg: AY/fxX6t5YcGPQGZW+SG7DIfQniM3InlxudFTWRmKkgvMQtCibek9MGvPTzpfoqOZFo t6woaxDQZEeSx6zxVPj1VW/hfzs/QXV3zEGerqwdchc00wHBzlaeYvliS0sdYp7ZDY6LddAkfjh 7ZGi/hTTQJBdoSU6AvdrwzzUASq5EpjBOLs1e+iK7eNBVuLhBeZof4Re6O2rCB3gzZy21fTfN74 oOLmZQ0PKZ+4KiaQsCHZ8hXqH/TjD83Tf3B/6itRo6nsXN7fqCPKwJF8+UpKkkBV+EIJrF4AJNB 83dfqg6cPaVUWO8gaD8GECr3cKP5bSmLKNC66QFxK5tIZZN1/O8c+rGT9x1nRLaBHEy8hD5R8W+ 59eWz X-Received: by 2002:a05:6000:2382:b0:431:316:920a with SMTP id ffacd0b85a97d-431031692d1mr10895549f8f.8.1766069197290; Thu, 18 Dec 2025 06:46:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4q56vyLty43kDx/T0LkcbJ7CE0qHxVI/I3jGhdPTMzKsiQBdIw7T3IMbs0DohHd+oJOJMrA== X-Received: by 2002:a05:6000:2382:b0:431:316:920a with SMTP id ffacd0b85a97d-431031692d1mr10895513f8f.8.1766069196762; Thu, 18 Dec 2025 06:46:36 -0800 (PST) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43244934b1fsm5591177f8f.8.2025.12.18.06.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 06:46:36 -0800 (PST) From: Andrew Burgess To: Tom de Vries , Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCHv3 1/7] gdb: improve line number lookup around inline functions In-Reply-To: <4316d420-4728-4b90-8e37-7c5429d1acbe@suse.de> References: <87qzuo9e9c.fsf@tromey.com> <87ldj141ra.fsf@redhat.com> <4316d420-4728-4b90-8e37-7c5429d1acbe@suse.de> Date: Thu, 18 Dec 2025 14:46:35 +0000 Message-ID: <87ike34zlg.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: F46ESaOb_yATV8JCV9xjLqASE9GlmjPWGmwPtLWUWRs_1766069198 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 Tom de Vries writes: > On 12/17/25 3:32 PM, Andrew Burgess wrote: >> Tom Tromey writes: >> >>>>>>>> "Andrew" == Andrew Burgess writes: >>> >>> Andrew> So my proposal is that the backward scan of the line table looking for >>> Andrew> an is-stmt entry should not be performed when NOTCURRENT is true. In >>> Andrew> the case above this means we will report the entry at index 9, which >>> Andrew> is for line 10, which is correct. >>> >>> Thanks for the explanation. It all made sense to me. >>> >>> Andrew> + if ![runto foo] { >>> >>> We're bracing if conditions these days. >>> >>> Otherwise this looks good to me. >>> >>> Approved-By: Tom Tromey >> >> I fixed the TCL bracing issue and pushed just this patch for now. I'm >> taking a deeper look at some of the questions you raised on the later >> patches. > > Hi, > > I'm getting: > ... > $ pre-commit run --all-files > black....................................................................Passed > flake8...................................................................Passed > isort....................................................................Passed > codespell................................................................Passed > check-include-guards.....................................................Passed > check-gnu-style..........................................................Passed > - hook id: check-gnu-style > - duration: 0.19s > check-whitespace.........................................................Passed > pre-commit-setup.........................................................Passed > tclint...................................................................Failed > - hook id: tclint > - exit code: 1 > > gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:211:26: expression with > substitutions should be enclosed by braces [unbraced-expr] > gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:212:26: expression with > substitutions should be enclosed by braces [unbraced-expr] Sorry for the breakage. I pushed the patch below to address this. Thanks, Andrew -- commit e3b02794ca17af6c12780ba32cb38c98e152a903 Author: Andrew Burgess Date: Thu Dec 18 13:30:38 2025 +0000 gdb/testsuite: fix tclint errors After commit: commit b5160e2ee6a0192389caf7acee1fc32961ed29f4 (upstream/master, upstream/HEAD, gdb-tmp-g) Date: Fri Jul 26 16:32:33 2024 +0100 gdb: improve line number lookup around inline functions the following tclint errors were reported: gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:211:26: expression with substitutions should be enclosed by braces [unbraced-expr] gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:212:26: expression with substitutions should be enclosed by braces [unbraced-expr] Fixed by this commit. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp index cf66897cd70..77a18918eb1 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp @@ -208,8 +208,8 @@ proc do_test { } { # is reported. We might get different line numbers depending on # how the architectures skip prologue function works. This test # is all about how frame #1 is reported. - set foo_body_1 [expr $::foo_prologue + 1] - set foo_body_2 [expr $::foo_prologue + 2] + set foo_body_1 [expr {$::foo_prologue + 1}] + set foo_body_2 [expr {$::foo_prologue + 2}] gdb_test "bt" \ [multi_line \ "^#0\\s+foo \\(\\) at \[^\r\n\]+$::srcfile:(?:$::foo_prologue|$foo_body_1|$foo_body_2)" \