From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BCE43857B88; Fri, 16 Feb 2024 17:56:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BCE43857B88 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708106195; bh=zyxGCMBCzg9HjWbXUGrObXbY+o+zQ0ZM7UB17nCEZ6s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YQg+NXf4kDT9NlCytQIn379J7Da9VYV1nAYjM7/f7461b3eemIz7A5EpmSxhrQvKj Ctc9kEZu3h44px8n3ySDo3wQ/cZB82tecVB5NHvGfdv6X6PEjaKDa7F9OOVrJYBEa8 FKtlAsOveFywzZcPyuuOd02DWpbv3Hm6fUmORXCA= From: "pedro at palves dot net" To: gdb-prs@sourceware.org Subject: [Bug server/30453] gdbserver cannot set breakpoints when /proc/pid/mem is not writable Date: Fri, 16 Feb 2024 17:56:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: server X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedro at palves dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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=3D30453 --- Comment #21 from Pedro Alves --- > I wonder if it would be possible to change ptrace to lift > the restriction here. Like IIUC the problem is that ptrace > can't read/write memory while the inferior is running, but > /proc/pid/mem can. If ptrace had this capability, then using > it as a fallback seems possible. /proc/pid/mem is also a lot more efficient. The ptrace interface only lets= you peek/poke one word at a time. So a lot of context switching. IMO, such workarounds aren't really necessary. We're only considering them because C= rOS hasn't implemented their downstream hardening properly. But they could.=20 Nothing stops them. --=20 You are receiving this mail because: You are on the CC list for the bug.=