From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 76B5A385842C; Wed, 7 Jun 2023 15:18:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76B5A385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686151095; bh=G8kuLuxqIo9lWAh4vbzHjQtCno2sqRtEv9pzq77xHaI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QVROkMr3bGp2M+BEXaKZKFQwhuqxEaSWKHtKYKb06VR+2IcMd7IvO9CrX9zVGQtC9 m4ffHry0R4yZ5iPNDfFWJ7n+Wb9z+n5VUeMThZyM/1vZ36bHhgNQzEBdlxA58Mfmbn S8chb2H3w8E6bKT5EpeXMhtyagnEA2fUpUVOwE3Y= From: "mattst88 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/30525] gdb cannot read shared libraries on SPARC64 Date: Wed, 07 Jun 2023 15:18:15 +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: mattst88 at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: 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=3D30525 --- Comment #7 from Matt Turner --- (In reply to Pedro Alves from comment #3) > So one thing to check is whether the HAVE_PREAD64 code is enabled. And > then, that may be failing due to a negative offset, give pread64's offset > parameter is an off_t. pread64 is enabled: checking for pread... yes checking for pread64... yes checking for pwrite... yes config.h contains /* Define to 1 if you have the `pread64' function. */ #define HAVE_PREAD64 1 > Try enabling "set debug linux-nat 1", so that the following log is output: >=20 > if (ret =3D=3D -1) > { > linux_nat_debug_printf ("accessing fd %d for pid %d failed: %s (%d)= ", > fd, pid, safe_strerror (errno), errno); > return TARGET_XFER_E_IO; > } >=20 > Maybe the errno gives us some clue. [linux-nat] open_proc_mem_file: opened fd 14 for lwp 2314199.2314199 [linux-nat] linux_proc_xfer_memory_partial_fd: accessing fd 14 for pid 2314= 199 failed: Invalid argument (22) [linux-nat] linux_proc_xfer_memory_partial_fd: accessing fd 14 for pid 2314= 199 failed: Invalid argument (22) > Does hacking the linux-nat.c:proc_mem_file_is_writable to always return > false paper over the problem? Yes, it does. --=20 You are receiving this mail because: You are on the CC list for the bug.=