From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CEF26385782D; Fri, 16 Feb 2024 20:53:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEF26385782D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708116809; bh=ZoDW+9IRxaZQTNhQCNNA2K/h8KSohr4T8bEmdvQ+/eo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lFfNwYfaldUCqD6EXRikmjU/4oVAqZJqYgqP66z8+iRByBsAqRyQuJD1G43+tPhUX DBuYI1tC1C0DVKL7wgOzpkKqkmrBdIrlNgVWbB3fVilN12Fr+UjBWWek6DikUY01uQ jf6gmsyR4lUAoisXP1iUH765b8+IctbPhrs2CivE= From: "mark at klomp dot org" 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 20:53:29 +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: mark at klomp dot org 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: cc 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 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org --- Comment #24 from Mark Wielaard --- There are also the process_vm_readv and process_vm_writev syscalls. These=20 system calls were added in Linux 3.2. Support is provided in glibc since version 2.15. Permission to read from or write to another process is governed by a ptrace access mode PTRACE_MODE_ATTACH_REALCREDS check. https://man7.org/linux/man-pages/man2/process_vm_readv.2.html So that is an alternative to directly reading /proc/pid/mem or using ptrace PEEK/POKE. In theory it should work if you can ptrace the process, so hopef= ully CrOS allows it. --=20 You are receiving this mail because: You are on the CC list for the bug.=