From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id 0AEB23858D1E; Thu, 10 Nov 2022 16:34:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0AEB23858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668098051; bh=Pa3epHxFs5b0WdZuioMp2BevQCRufhikfJSv5AifGIA=; h=From:To:Subject:Date:From; b=joSlDbNRTdnmj8LD14TPlpBbQlPcuqwxPErZIVHannivqEsrilCb/GA4ftqhSdrIx G9iqAOIblY43rzyzVsQ6Cg4g+6Htzd4jV3H85HSaagW/q2bjQz1mSRuH39197QJv3L 2FjM5hrNDKDIQux7fgCzfrezPyHUNWxwLx+mXTuE= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: use frame_id_p instead of comparing to null_frame_id in frame_info_ptr::reinflate X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: 73cafdbd1ddd6ebfa21d737e3b69ae5aafd70c23 X-Git-Newrev: 45eca9d9f36985672cb2303b4ea0b3c855961c1d Message-Id: <20221110163411.0AEB23858D1E@sourceware.org> Date: Thu, 10 Nov 2022 16:34:11 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D45eca9d9f369= 85672cb2303b4ea0b3c855961c1d commit 45eca9d9f36985672cb2303b4ea0b3c855961c1d Author: Simon Marchi Date: Mon Oct 24 16:16:09 2022 -0400 gdb: use frame_id_p instead of comparing to null_frame_id in frame_info= _ptr::reinflate =20 The assertion =20 gdb_assert (m_cached_id !=3D null_frame_id); =20 is always true, as comparing equal to null_frame_id is always false (it's the first case in frame_id::operator=3D=3D, not sure why it's not= this way, but that's what it is). =20 Replace the comparison with a call to frame_id_p. =20 Approved-By: Tom Tromey Change-Id: I93986e6a85ac56353690792552e5b3b4cedec7fb Diff: --- gdb/frame-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/frame-info.c b/gdb/frame-info.c index 84791205d90..584222dc490 100644 --- a/gdb/frame-info.c +++ b/gdb/frame-info.c @@ -39,7 +39,7 @@ frame_info_ptr::prepare_reinflate () void frame_info_ptr::reinflate () { - gdb_assert (m_cached_id !=3D null_frame_id); + gdb_assert (frame_id_p (m_cached_id)); =20 if (m_ptr =3D=3D nullptr) m_ptr =3D frame_find_by_id (m_cached_id).get ();