public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "pedro at palves dot net" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug server/31554] New: gdbserver --once --multi mishandles run & attach failures Date: Mon, 25 Mar 2024 18:19:19 +0000 [thread overview] Message-ID: <bug-31554-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=31554 Bug ID: 31554 Summary: gdbserver --once --multi mishandles run & attach failures Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: server Assignee: unassigned at sourceware dot org Reporter: pedro at palves dot net Target Milestone: --- "gdbserver --once --multi" mishandles run or attach failures. GDBserver exits/disconnects on run/attach failure, but it should not. From --help: --multi Start server without a specific program, and only quit when explicitly commanded. --once Exit after the first connection has closed. E.g., for "run": On GDB side: ... (gdb) tar extended-remote :9999 ... Remote debugging using :9999 (gdb) r Starting program: Running ".../gdb.base/run-fail-twice/run-fail-twice.nox" on the remote target failed (gdb) On GDBserver side: $ gdbserver --once --multi :9999 Remote debugging from host 127.0.0.1, port 34344 bash: line 1: .../gdb.base/run-fail-twice/run-fail-twice.nox: Permission denied bash: line 1: exec: .../gdb.base/run-fail-twice/run-fail-twice.nox: cannot execute: Permission denied gdbserver: During startup program exited with code 126. $ # gdbserver exited This gdbserver exit is wrong, as we've connected with extended-remote/--multi. Here's an example for "attach": On GDB side: ... (gdb) tar extended-remote :9999 ... Remote debugging using :19999 (gdb) attach 1 Attaching to process 1 Attaching to process 1 failed (gdb) On GDBserver side: $ gdbserver --once --multi :9999 Listening on port 9999 Remote debugging from host 127.0.0.1, port 37464 gdbserver: Cannot attach to process 1: Operation not permitted (1) $ # gdbserver exited This gdbserver exit is also wrong, as we've connected with extended-remote/--multi. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2024-03-25 18:19 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-25 18:19 pedro at palves dot net [this message] 2024-03-25 18:20 ` [Bug server/31554] " pedro at palves dot net 2024-04-12 17:45 ` cvs-commit at gcc dot gnu.org 2024-04-26 20:24 ` cvs-commit at gcc dot gnu.org 2024-04-26 21:12 ` pedro at palves dot net
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-31554-4717@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).