Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: [RFC][gdb/testsuite] Remove breakpoint command in gdb.base/ui-redirect.exp
Date: Tue, 03 Sep 2019 17:43:00 -0000	[thread overview]
Message-ID: <3150ecd9-9221-4360-6a16-563b3c5ef1ab@suse.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

Hi,

I noticed a bit in gdb.base/ui-redirect.exp that sets a breakpoint
command on main, but then due to runto_main, the break point is deleted:
...
(gdb) break main^M
Breakpoint 1 at 0x4004d7: file
/data/gdb_versions/devel/src/gdb/testsuite/gdb.base/start.c, line 34.^M
(gdb) commands^M
Type commands for breakpoint(s) 1, one per line.^M
End with a line saying just "end".^M
>PASS: gdb.base/ui-redirect.exp: commands
print 1^M
>PASS: gdb.base/ui-redirect.exp: print 1
end^M
(gdb) PASS: gdb.base/ui-redirect.exp: end
delete breakpoints^M
Delete all breakpoints? (y or n) y^M
...

In the original commit ( submission here
https://sourceware.org/ml/gdb-patches/2010-09/msg00120.html ) there was
no runto_main, and the breakpoint command was not triggered either.

Is this some artefact, and can it be removed, or is it actually testing
something related to redirection?

Thanks,
- Tom

[-- Attachment #2: tmp.patch --]
[-- Type: text/x-patch, Size: 678 bytes --]

diff --git a/gdb/testsuite/gdb.base/ui-redirect.exp b/gdb/testsuite/gdb.base/ui-redirect.exp
index 4507ac51a2..e48ca72e91 100644
--- a/gdb/testsuite/gdb.base/ui-redirect.exp
+++ b/gdb/testsuite/gdb.base/ui-redirect.exp
@@ -23,23 +23,6 @@ if { [prepare_for_testing "failed to prepare" ui-redirect start.c] } {
     return -1
 }
 
-gdb_breakpoint main
-
-set test "commands"
-gdb_test_multiple $test $test {
-    -re "End with a line saying just \"end\"\\.\r\n>$" {
-	pass $test
-    }
-}
-
-set test "print 1"
-gdb_test_multiple $test $test {
-    -re "\r\n>$" {
-	pass $test
-    }
-}
-gdb_test_no_output "end"
-
 if ![runto_main] {
     fail "can't run to main"
     return -1

             reply	other threads:[~2019-09-03 17:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 17:43 Tom de Vries [this message]
2019-09-04 10:59 ` Andrew Burgess
2019-09-04 11:57   ` Jan Kratochvil
2019-09-04 11:49 ` Jan Kratochvil
2019-09-05  7:35   ` [PATCH][gdb/testsuite] Restore breakpoint command in ui-redirect.exp Tom de Vries
2019-09-05 12:03     ` Jan Kratochvil
2019-09-05 12:07       ` Tom de Vries
2019-09-05 12:20     ` Pedro Alves
2019-09-05 12:42       ` Tom de Vries

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=3150ecd9-9221-4360-6a16-563b3c5ef1ab@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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: link
Be 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