From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 2D3DD3858C5F for ; Tue, 18 Apr 2023 02:26:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D3DD3858C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=hev.cc Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hev.cc Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-2fbb99cb297so554295f8f.1 for ; Mon, 17 Apr 2023 19:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hev-cc.20221208.gappssmtp.com; s=20221208; t=1681784787; x=1684376787; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TIrATIknah0TUOxtat2HIa9OWQzP7SR6SfPhngjhOG8=; b=Yg+7GJ+f9wxfvdZQRe2rn9KcKxOYuibOkHng/gh93yKW3Mj9zKHkYcm3DQLwaU3KxA I8DIZju5i+4TNdZiq+zJthKsjvd8szmIlKUm7q/enEw9p/eEKU10kgHp7CaowoEuhwoM XzQAsyxaHNA6LXRN5DtQedxfucPjZhCl9DLiXxRPP6zZT6Dr14LXgUnikHDjl5D4/OYP 3vuHrTVOmnSobe+DIEvw8lSoA6rG0/pQoFm0c6GLk5GiE0L/pCosY6OhABmail+83+7R WuR83rBS34X/5v2sn5CMvTSjYXPCOEq1RWUMjh+vFxmuusI79UttpiN4EiY9zJqGGP1N WrGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681784787; x=1684376787; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TIrATIknah0TUOxtat2HIa9OWQzP7SR6SfPhngjhOG8=; b=beaTuuJ7VOwjQo2id8yI7fOjto5uMNBjJQMSKaI5p81+Q7v+FHNdn9OPZ44XuV37pA wGI044ZPSf+zrOBLo+XvNhNozE86uCxCla/nDxNHqsjp4kQVevtpEdkaKsVizuy/CiFY Irb8eFblaCd8/HXOxkEcqWtqzfpefS92rjCfdKN8Z5T4ZI04omsFt3yWYm70jbqFeyyb 9S0wmaL8nwgHI/px/gcfJ3IY1MqIpxmL/0rp/9tiBpPh5wOzDiOJQ50bTrfAebJkoo/P vaoi2T/B/keTrvEv+Aa12SJTdtAOdvA7pkNHaVK34nzTX+GqZc+TWPhNpxdwUzmB5qOY NCSw== X-Gm-Message-State: AAQBX9e9EmiBbVtp8LU0JNM4X2rjTibQprY3faqkNZJpA4+rJ4sczgcu TNQvchRpLTeXg7nRUToaQJEcaSUXE6b8MbTjphUEkA== X-Google-Smtp-Source: AKy350YGCg+Gd6dX5kMT0v2twINSEXbRWrcJ2aZkruFwvkv0MTp3CCB85ubJuWDLI3dUsE7kubBv3oAgIaIPLmA/4DY= X-Received: by 2002:a5d:650c:0:b0:2f4:6fe5:b07e with SMTP id x12-20020a5d650c000000b002f46fe5b07emr553507wru.40.1681784786788; Mon, 17 Apr 2023 19:26:26 -0700 (PDT) MIME-Version: 1.0 References: <20230417162428.48426-1-r@hev.cc> <1259de63-932e-ca42-632b-fe080067da12@amd.com> In-Reply-To: <1259de63-932e-ca42-632b-fe080067da12@amd.com> From: hev Date: Tue, 18 Apr 2023 10:26:16 +0800 Message-ID: Subject: Re: [PATCH] gdb: Fix false match issue in skip_prologue_using_linetable To: Lancelot SIX Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: Hello Lancelot, Thanks for your comments. On Tue, Apr 18, 2023 at 5:13=E2=80=AFAM Lancelot SIX = wrote: > > > > > diff --git a/gdb/symtab.c b/gdb/symtab.c > > index f2b1a14e006..a662d7d1869 100644 > > --- a/gdb/symtab.c > > +++ b/gdb/symtab.c > > @@ -3735,7 +3735,7 @@ skip_prologue_using_linetable (CORE_ADDR func_add= r) > > }); > > > > for (; > > - it < linetable->item + linetable->nitems && it->pc <=3D end_= pc; > > + it < linetable->item + linetable->nitems && it->pc < end_pc; > > it++) > > if (it->prologue_end) > > return {it->pc}; > > Hi Rui, thanks for spotting this. > > I am not a maintainer, so I can only comment. > > I do not think this patch applies cleanly to the master branch, but the > change should be trivial. That being said, it is true that > find_pc_partial_function returns the first address past the end of the > function, so the change looks good to me. Thanks for spotting this! I realized that I made a mistake. I have been focusing so much on debugging Rust issues that I forgot to work on the 13 branch. I will work on the v2 patch. Thank you! -- Rui