public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/29907] gdb tries to open /proc/pid/mem even for --version Date: Fri, 16 Dec 2022 16:06:14 +0000 [thread overview] Message-ID: <bug-29907-4717-f9qEx11V3j@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29907-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29907 --- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Pedro Alves <palves@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9dff6a5d54f212f875b6551444393691a2410f3e commit 9dff6a5d54f212f875b6551444393691a2410f3e Author: Pedro Alves <pedro@palves.net> Date: Fri Dec 16 12:04:54 2022 +0000 Delay checking whether /proc/pid/mem is writable (PR gdb/29907) As of 1bcb0708f229 ("gdb/linux-nat: Check whether /proc/pid/mem is writable"), GDB checks if /proc/pid/mem is writable. This is done early at GDB startup, in order to get a consistent warning, instead of a warning that depends on whenever GDB writes to inferior memory. PR gdb/29907 points out that some build systems (like QEMU's, apparently) may call 'gdb --version' to check GDB's presence & its version on the system, and that Gentoo's build process has sandboxing which blocks the /proc/pid/mem access and thus GDB warns, which results in build fails. To help with that, this patch delays the /proc/pid/mem check until we start or attach to an inferior. Ends up potentially emiting a warning close where we already emit other ptrace- and /proc- related warnings, which just Feels Right. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29907 Change-Id: I5537653ecfbbe76a04ab035e40e59d09b4980763 -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-12-16 16:06 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-16 6:56 [Bug gdb/29907] New: " sam at gentoo dot org 2022-12-16 6:57 ` [Bug gdb/29907] " sam at gentoo dot org 2022-12-16 12:32 ` pedro at palves dot net 2022-12-16 16:06 ` cvs-commit at gcc dot gnu.org [this message] 2022-12-16 16:14 ` pedro at palves dot net 2022-12-16 23:10 ` sam at gentoo dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29907-4717-f9qEx11V3j@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).