From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD49D3858C54; Sat, 9 Apr 2022 15:17:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD49D3858C54 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/28987] Outdated value being displayed for variable while DWARF info apparently contains the correct one Date: Sat, 09 Apr 2022 15:17:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 11.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cf_reconfirmed_on cc bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2022 15:17:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28987 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2022-04-09 CC| |tromey at sourceware dot o= rg Status|UNCONFIRMED |NEW --- Comment #1 from Tom Tromey --- I can reproduce. I see this: (gdb) info addr i Symbol "i" is multi-location: Base address 0x201140 Range 0x201140-0x201140: the constant 0 Range 0x201140-0x201140: the constant 1 Range 0x201140-0x201140: the constant 2 Range 0x201140-0x201140: the constant 3 Range 0x201140-0x201140: the constant 4 Range 0x201140-0x201140: the constant 5 Range 0x201140-0x201140: the constant 6 Range 0x201140-0x201140: the constant 7 Range 0x201140-0x201151: the constant 8 . (gdb) p $pc $2 =3D (void (*)()) 0x201140 I think this falls into this case in dwarf2/loc.c: if (low =3D=3D high && pc =3D=3D low) { /* This is entry PC record present only at entry point of a function. Verify it is really the function entry point. = */ I don't really know why this code is exactly here. Like, it has to do with computing entry values, but I don't know why it's needed. If I comment out that block, this test case works. --=20 You are receiving this mail because: You are on the CC list for the bug.=