From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AB8493858D1E; Wed, 29 Mar 2023 16:45:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB8493858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680108329; bh=dtkrejV+Bmh/U42fwua++ukQkRbBtgTzYSa01rDYoho=; h=From:To:Subject:Date:From; b=N50B9cbHQ3owqLAHwyKRL1NGG4W5gT8RSeQb2Q/ppyGDQrdIRtiYgUkFaZj2xrM8K wHZw4IYkwjskmAtagtXBbVT5wuyVW4craVRUvc8hlhfZZUycr2dUn1U5+8VR7Nn16Z UYALEOL6KljUhW4gFVwk8yqLVGRAP+OEVoVGDGW0= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug cli/30288] New: [gdb/cli, editing off] FAIL: gdb.base/trace-commands.exp: nested trace-commands test (pattern 2) Date: Wed, 29 Mar 2023 16:45:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D30288 Bug ID: 30288 Summary: [gdb/cli, editing off] FAIL: gdb.base/trace-commands.exp: nested trace-commands test (pattern 2) Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: cli Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I wrote a target board that sets editing to off by default, and ran the testsuite. With test-case gdb.base/trace-commands.exp, I ran into trouble, with tests = that send several commands at a time, using gdb_test_sequence to match the outpu= t. I did this to get a clear look at what happens (because the output of gdb_test_sequence confuses me): ... # Nested test +send_gdb "if 1\nset \$i =3D 0\nwhile \$i < 5\nfunc \$i\nset \$i +=3D 1\nend\nend\n" +gdb_test "" ".*" "test" +exit + ... With the default, editing on, I get: ... (gdb) PASS: gdb.base/trace-commands.exp: simple trace-commands test if 1 +if 1 >set $i =3D 0 >while $i < 5 >func $i >set $i +=3D 1 >end >end ++set $i =3D 0 ++while $i < 5 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 (gdb) PASS: gdb.base/trace-commands.exp: test ... With editing off, I get instead: ... (gdb) PASS: gdb.base/trace-commands.exp: simple trace-commands test if 1 set $i =3D 0 while $i < 5 func $i set $i +=3D 1 end end +if 1 > > > > > >++set $i =3D 0 ++while $i < 5 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 +++func $i ++++echo in func $i\n in func $i +++set $i +=3D 1 (gdb) PASS: gdb.base/trace-commands.exp: test ... If I do an interactive session with editing set to off, and issue one comma= nd at a time, I do see the expected output. Tentatively marking this as component cli, but perhaps this is a testsuite issue. If it's a testsuite issue, we should error out in send_gdb if the command string contains more than one "\n". --=20 You are receiving this mail because: You are on the CC list for the bug.=