public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "hi-angel at yandex dot ru" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/31107] New: In non-stop mode ^C pauses 1-st thread disregarding currently focused one Date: Fri, 01 Dec 2023 14:02:32 +0000 [thread overview] Message-ID: <bug-31107-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=31107 Bug ID: 31107 Summary: In non-stop mode ^C pauses 1-st thread disregarding currently focused one Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: hi-angel at yandex dot ru Target Milestone: --- When `non-stop` is `on` and you focus a thread different from 1, then `continue -a`; pressing ^C always interrupts the `1st` thread. Not only that makes no sense, this is problematic even because if the 1st thread does some networking that you don't want to stop, you have no influence over that. IMO non-stop mode should not pause any thread whatsoever. The documentation does not mention behavior regarding pressing ^C. # Steps to reproduce *(in terms of terminal commands)* As part of steps I use `firefox` as a popular multithreaded app, but the problem is reproducible with any app that has 2 or more threads. $ gdb -q --nx -iex "set mi-async on" -iex "set non-stop on" -p $(pgrep firefox) […] (gdb) i thr Id Target Id Frame * 1 Thread 0x7faf57499500 (LWP 238513) "firefox" 0x00007faf5700ef6f in poll () from /usr/lib/libc.so.6 2 Thread 0x7faf56cff6c0 (LWP 238516) "pool-spawner" 0x00007faf5701a73d in syscall () from /usr/lib/libc.so.6 3 Thread 0x7faf488ff6c0 (LWP 238517) "gmain" 0x00007faf5700ef6f in poll () from /usr/lib/libc.so.6 4 Thread 0x7faf480fe6c0 (LWP 238518) "gdbus" 0x00007faf5700ef6f in poll () from /usr/lib/libc.so.6 […] (gdb) thr 2 [Switching to thread 2 (Thread 0x7faf56cff6c0 (LWP 238516))] #0 0x00007faf5701a73d in syscall () from /usr/lib/libc.so.6 (gdb) c -a […] Quit # ^C is pressed (gdb) i thr Id Target Id Frame 1 Thread 0x7faf57499500 (LWP 238513) "firefox" 0x00007faf5700ef6f in poll () from /usr/lib/libc.so.6 * 2 Thread 0x7faf56cff6c0 (LWP 238516) "pool-spawner" (running) 3 Thread 0x7faf488ff6c0 (LWP 238517) "gmain" (running) 4 Thread 0x7faf480fe6c0 (LWP 238518) "gdbus" (running) ## Expected `Thread 1` in the last output is not stopped (either because `Thread 2` is stopped instead, or because no threads stopped whatsoever since we are in non-stop mode). ## Actual `Thread 1` is stopped at `poll()`. -- You are receiving this mail because: You are on the CC list for the bug.
reply other threads:[~2023-12-01 14:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-31107-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).