From: Shahab Vahedi <shahab.vahedi@gmail.com>
To: gdb-patches@sourceware.org
Cc: Shahab Vahedi <shahab@synopsys.com>,
Shahab Vahedi <shahab.vahedi@gmail.com>,
Francois Bedard <fbedard@synopsys.com>,
Anton Kolesov <Anton.Kolesov@synopsys.com>
Subject: [PATCH 09/14] gdb/testsuite: Fix break-always.exp for enabled do_reload_on_run
Date: Fri, 07 Feb 2020 15:01:00 -0000 [thread overview]
Message-ID: <20200207150003.8383-10-shahab.vahedi@gmail.com> (raw)
In-Reply-To: <20200207150003.8383-1-shahab.vahedi@gmail.com>
From: Anton Kolesov <Anton.Kolesov@synopsys.com>
GDB testsuite proc "runto" is not compatible with "always-inserted on"
when gdb,do_reload_on_run is set - in this case "runto" will insert
breakpoint, and then will do a reload, which will overwrite an already
inserted breakpoint, so further continue will not succeed. There is no
problem with "always-inserted off", because breakpoints are inserted
automatically by GDB before resuming, so reloading doesn't overwrite
them.
gdb/testsuite/ChangeLog:
2016-07-19 Anton Kolesov <Anton.Kolesov@synopsys.com>
* gdb.base/break-always.exp: Move "runto" before
"always-inserted on".
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
---
gdb/testsuite/gdb.base/break-always.exp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.base/break-always.exp b/gdb/testsuite/gdb.base/break-always.exp
index b2a2f3a475cb..c3b55b9f8402 100644
--- a/gdb/testsuite/gdb.base/break-always.exp
+++ b/gdb/testsuite/gdb.base/break-always.exp
@@ -21,6 +21,14 @@ if { [prepare_for_testing "failed to prepare" break-always break-always.c] } {
return -1
}
+# GDB testsuite proc "runto" is not compatible with "always-inserted on" when
+# gdb,do_reload_on_run is set - in this case "runto" will insert breakpoint,
+# and then will do a reload, which will overwrite an already inserted
+# breakpoint, so further continue will not succeed. There is no problem with
+# "always-inserted off", because breakpoints are inserted automatically by GDB
+# before resuming, so reloading doesn't overwrite them.
+runto foo
+
set bar_location [gdb_get_line_number "break in bar" break-always.c]
gdb_test_no_output "set breakpoint always-inserted on"
@@ -28,8 +36,6 @@ gdb_test_no_output "set breakpoint always-inserted on"
gdb_test "show breakpoint always-inserted" "mode is on\." \
"confirm breakpoint always-inserted"
-runto foo
-
gdb_test "break bar" "Breakpoint 2.*" "set breakpoint on bar"
gdb_test "break bar" "Note: breakpoint 2 also set.*Breakpoint 3.*" "set 2nd breakpoint on bar"
gdb_test "break bar" "Note: breakpoints 2 and 3 also set.*Breakpoint 4.*" "set 3rd breakpoint on bar"
--
2.25.0
next prev parent reply other threads:[~2020-02-07 15:01 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 15:01 [PATCH 00/14] Fixes for GDB Testsuites Shahab Vahedi
2020-02-07 15:01 ` [PATCH 01/14] gdb/testsuite: Fix an invalid is_remote check in fileio test Shahab Vahedi
2020-02-11 7:29 ` Luis Machado
2020-02-18 7:31 ` Shahab Vahedi
2020-02-26 19:38 ` Andrew Burgess
2020-02-07 15:01 ` [PATCH 12/14] gdb/testsuite: Skip on of the interp.exp test for remote targets Shahab Vahedi
2020-02-07 15:01 ` [PATCH 03/14] gdb/testsuite: Add exit_is_reliable proc Shahab Vahedi
2020-02-11 7:35 ` Luis Machado
2020-02-26 19:45 ` Andrew Burgess
2020-02-07 15:01 ` [PATCH 14/14] gdb/testsuite: Skip some compile.exp tests when running with gdb-comm board Shahab Vahedi
2020-02-07 15:01 ` [PATCH 10/14] gdb/testsuite: Fix gdb.base/chng-syms.exp for remote target Shahab Vahedi
2020-02-07 15:01 ` [PATCH 13/14] gdb/testsuite: Skip killed-outside when nosignals Shahab Vahedi
2020-02-07 15:01 ` [PATCH 08/14] gdb/testsuite: Fix bug in break-unload-file Shahab Vahedi
2020-02-07 15:01 ` [PATCH 11/14] gdb/testsuite: Fix dbx.exp for remote targets Shahab Vahedi
2020-02-11 8:27 ` Luis Machado
2020-02-07 15:01 ` [PATCH 05/14] gdb/testsuite: Skip a few gdb.base/skip.exp tests " Shahab Vahedi
2020-02-11 8:20 ` Luis Machado
2020-02-18 15:45 ` Shahab Vahedi
2020-02-25 8:39 ` Anton Kolesov
2020-02-26 20:52 ` Andrew Burgess
2020-02-07 15:01 ` [PATCH 02/14] gdb/testsuite: Skip fileio.exp " Shahab Vahedi
2020-02-11 7:32 ` Luis Machado
2020-02-26 19:40 ` Andrew Burgess
2020-02-07 15:01 ` [PATCH 07/14] gdb/testsuite: Fix invalid watchpoint test in mi suite Shahab Vahedi
2020-02-07 15:01 ` Shahab Vahedi [this message]
2020-02-07 15:01 ` [PATCH 06/14] gdb/testsuite: Fix gdb.mi exit function Shahab Vahedi
2020-02-07 15:01 ` [PATCH 04/14] gdb/testsuite: Avoid fake failures when exit is unreliable Shahab Vahedi
2020-02-11 8:10 ` Luis Machado
2020-02-18 15:41 ` Shahab Vahedi
2020-02-25 7:47 ` Anton Kolesov
2020-02-26 20:42 ` Andrew Burgess
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=20200207150003.8383-10-shahab.vahedi@gmail.com \
--to=shahab.vahedi@gmail.com \
--cc=Anton.Kolesov@synopsys.com \
--cc=fbedard@synopsys.com \
--cc=gdb-patches@sourceware.org \
--cc=shahab@synopsys.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).