From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B4BAD3870C06; Tue, 14 May 2024 03:00:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4BAD3870C06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715655648; bh=7D6D5PBx147xrkyW6PRi7cKt9faMPRytqOd9Gs4dkJY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j2CFhJalxWFq6sbEtcvvnPU5+5zSpH8XsxRoaOa9Cjrzjnr/nE6Lxw3R9T03y8Elb tT89l+yPb9KJnZWAeDDWptrW4pnyLCvQfs81LlLzw5lEkh1Ah1kVlKLTrHZRjPfFb6 K64YcoEKBTB4pNwydmNKh2osaw/Oxa+4F2x4Wd9A= From: "kevinb at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/31563] Problems with accessing errno Date: Tue, 14 May 2024 03:00:48 +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: kevinb at redhat dot com 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 #6 from Kevin Buettner --- (In reply to Pedro Alves from comment #5) > It would also be interesting to test accessing errno in a program that ne= ver > references it. Like: >=20 > int main() > { > return 0; // stop here and access errno. > } >=20 > This models a program that actually calls some function that sets errno, = but > in a different translation unit, potentially even in a library, and then = the > user wants to inspect errno. >=20 > Does your testcase cover this scenario? No. I'd be inclined to write another/different test for that scenario. Also, I think that such a test should make a library/system call since the above example need not provide access to errno. --=20 You are receiving this mail because: You are on the CC list for the bug.=