From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C907F3858C50; Wed, 29 Mar 2023 15:19:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C907F3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680103166; bh=0Nss+V93vYKRXFGh8JOV0LSA0O/UaelkMG87SMkxT5k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jV+5GmZVq0fvFmYTXMQoFnnMbyIqPcTmtk8+UZDfjslMipgCVi6wIvtbuhjKVZZIx o+Oq0ostF54lUpkp3p0RF2zxUrDQMraNMwVvX5+CMuNDTObxqDMDC2i3Jz5CP/WjSk tJ5TrKuHj9JbZWmHm/ZBv/zRqz4/nrpHaMfcjLrM= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug cli/22454] logging sometimes prints prompt Date: Wed, 29 Mar 2023 15:19:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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=3D22454 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vries at gcc dot gnu.org --- Comment #3 from Tom de Vries --- I ran into this as well with gdb.ada/access_to_packed_array.exp, and a targ= et board that defaults to "set editing off". This fixed it for me: ... diff --git a/gdb/event-top.c b/gdb/event-top.c index 53ddd515be7..e5838bafc33 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -447,8 +447,8 @@ display_gdb_prompt (const char *new_prompt) /* Don't use a _filtered function here. It causes the assumed character position to be off, since the newline we read from the user is not accounted for. */ - printf_unfiltered ("%s", actual_gdb_prompt.c_str ()); - gdb_flush (gdb_stdout); + printf ("%s", actual_gdb_prompt.c_str ()); + fflush (stdout); } } ... which I suppose mimics what readline would otherwise do. --=20 You are receiving this mail because: You are on the CC list for the bug.=