From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 87EFC3849ADD; Mon, 13 May 2024 15:05:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87EFC3849ADD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715612711; bh=j6JMOXa1rNVvCB4ManpQY7zSObShH20FeLyBCgWU8W8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nOgMH6XGQbrB82IZTLWuLg8RumBSqkS3L0NwSBqMz9okxQM5Kqq3n7iCxTQTaInV+ 0BKzH8eXb+jmGv+PA7l0iAYgnfbxOTymM0LleF3rnoVixXO+8gOwZ4khmtw06nIX5O TChtZ0SoCS+VgwJcm749TNX/k1F0IWHEnJhOk/qg= From: "pedro at palves dot net" To: gdb-prs@sourceware.org Subject: [Bug gdb/31563] Problems with accessing errno Date: Mon, 13 May 2024 15:05:10 +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: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedro at palves dot net X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: kevinb at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31563 --- Comment #5 from Pedro Alves --- Indeed. It has no pc range because it's a declaration (DW_AT_declaration). It would also be interesting to test accessing errno in a program that never references it. Like: int main() { return 0; // stop here and access errno. } This models a program that actually calls some function that sets errno, bu= t in a different translation unit, potentially even in a library, and then the u= ser wants to inspect errno. Does your testcase cover this scenario? This reminded me of clang's -fstandalone-debug, which is on by default: https://clang.llvm.org/docs/UsersManual.html#cmdoption-fstandalone-debug which I guess could also affect some of these scenarios. --=20 You are receiving this mail because: You are on the CC list for the bug.=