public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug server/30815] New: gdbserver prints debug info unconditionally to stderr
@ 2023-08-31 16:22 gdb-ml at jaeckel dot eu
2023-09-01 12:43 ` [Bug server/30815] " tromey at sourceware dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gdb-ml at jaeckel dot eu @ 2023-08-31 16:22 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30815
Bug ID: 30815
Summary: gdbserver prints debug info unconditionally to stderr
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: server
Assignee: unassigned at sourceware dot org
Reporter: gdb-ml at jaeckel dot eu
Target Milestone: ---
Created attachment 15097
--> https://sourceware.org/bugzilla/attachment.cgi?id=15097&action=edit
A WIP patch to approach the issue.
When debugging an ncurses application that is using other background
processes/threads (like e.g. `profanity` https://profanity-im.github.io/),
`gdbserver` prints `Detaching from process XYZ` directly to stderr after
`profanity` started one of those processes.
This leads to the ncurses window being modified and those debug statements
being printed somewhere on the screen.
Reproducing is possible with e.g. profanity.
1. start profanity in gdbserver
```
$ gdbserver localhost:1234 profanity
```
2. connect to said gdbserver instance in another terminal
```
$ gdb -ex "target remote localhost:1234" -ex continue
```
3. connect with profanity to an xmpp server
```
/connect <jid>
```
Now you will see multiple `Detaching from process XYZ` messages throughout the
window.
I've been able to reproduce some artifacts with `irssi` as well, but it's not
that obvious as with `profanity`.
The patchfile that I've attached solves my initial problem, those messages
aren't printed in the debugged window anymore. Still the patch is not complete
as described in the commit message and I didn't want to invest more time before
I've got the OK that this could be an acceptable solution.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug server/30815] gdbserver prints debug info unconditionally to stderr
2023-08-31 16:22 [Bug server/30815] New: gdbserver prints debug info unconditionally to stderr gdb-ml at jaeckel dot eu
@ 2023-09-01 12:43 ` tromey at sourceware dot org
2025-03-04 14:43 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2023-09-01 12:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30815
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Another option might be to send this back to gdb in "O" packets.
However, this won't work with non-stop.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug server/30815] gdbserver prints debug info unconditionally to stderr
2023-08-31 16:22 [Bug server/30815] New: gdbserver prints debug info unconditionally to stderr gdb-ml at jaeckel dot eu
2023-09-01 12:43 ` [Bug server/30815] " tromey at sourceware dot org
@ 2025-03-04 14:43 ` vries at gcc dot gnu.org
2025-03-04 14:59 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2025-03-04 14:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30815
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vries at gcc dot gnu.org
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
I've managed to reproduce with gdb as ncurses app.
Terminal 1:
...
$ gdbserver localhost:2345 gdb -tui
Process gdb created; pid = 18849
Listening on port 2345
...
Terminal 2:
...
$ gdb -ex "target remote localhost:2345"
...
0x00007ffff7fe4f00 in _start () from target:/lib64/ld-linux-x86-64.so.2
(gdb) continue
...
Terminal 1: Check for presence of TUI window
Terminal 2: Press ^C, and:
...
(gdb) detach
Detaching from program: target:/usr/bin/gdb, process 18849
Ending remote debugging.
[Inferior 1 (process 18849) detached]
(gdb)
...
Terminal 1: Observe "Detaching from process 18849" in TUI command window:
...
┌─────────────────────────────────────────────────────────────────────────────┐
│ │
│ │
│ │
│ │
│ │
│ [ No Source Available ] │
│ │
│ │
│ │
│ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
None No process In: L?? PC: ??
(gdb) Detaching from process 18849
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug server/30815] gdbserver prints debug info unconditionally to stderr
2023-08-31 16:22 [Bug server/30815] New: gdbserver prints debug info unconditionally to stderr gdb-ml at jaeckel dot eu
2023-09-01 12:43 ` [Bug server/30815] " tromey at sourceware dot org
2025-03-04 14:43 ` vries at gcc dot gnu.org
@ 2025-03-04 14:59 ` vries at gcc dot gnu.org
2026-01-25 17:39 ` tromey at sourceware dot org
2026-01-25 17:41 ` tromey at sourceware dot org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2025-03-04 14:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30815
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to jaeckel from comment #0)
> Still the patch is not
> complete as described in the commit message
That's:
...
This patch is not completely functional, as the file somehow doesn't get
updated until the debugging session is finished, even though the `FILE*`
gets `fflush()`'ed.
...
I can't reproduce this with the scenario in comment 2, but perhaps that's
because the detach that generates the message also finishes the debug session.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug server/30815] gdbserver prints debug info unconditionally to stderr
2023-08-31 16:22 [Bug server/30815] New: gdbserver prints debug info unconditionally to stderr gdb-ml at jaeckel dot eu
` (2 preceding siblings ...)
2025-03-04 14:59 ` vries at gcc dot gnu.org
@ 2026-01-25 17:39 ` tromey at sourceware dot org
2026-01-25 17:41 ` tromey at sourceware dot org
4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2026-01-25 17:39 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30815
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |27910
Referenced Bugs:
https://sourceware.org/bugzilla/show_bug.cgi?id=27910
[Bug 27910] support for host console output in non-stop mode
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug server/30815] gdbserver prints debug info unconditionally to stderr
2023-08-31 16:22 [Bug server/30815] New: gdbserver prints debug info unconditionally to stderr gdb-ml at jaeckel dot eu
` (3 preceding siblings ...)
2026-01-25 17:39 ` tromey at sourceware dot org
@ 2026-01-25 17:41 ` tromey at sourceware dot org
4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2026-01-25 17:41 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30815
--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
*** Bug 27612 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-25 17:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 16:22 [Bug server/30815] New: gdbserver prints debug info unconditionally to stderr gdb-ml at jaeckel dot eu
2023-09-01 12:43 ` [Bug server/30815] " tromey at sourceware dot org
2025-03-04 14:43 ` vries at gcc dot gnu.org
2025-03-04 14:59 ` vries at gcc dot gnu.org
2026-01-25 17:39 ` tromey at sourceware dot org
2026-01-25 17:41 ` tromey at sourceware dot org
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).